Skip to content

Commit ad7b539

Browse files
committed
add separate test for clusterclient constructor
1 parent 06f0e04 commit ad7b539

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

universal_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var _ = Describe("UniversalClient", func() {
3939
Expect(client.Ping(ctx).Err()).NotTo(HaveOccurred())
4040
})
4141

42-
It("should connect to clusters with unstableresp3", Label("NonRedisEnterprise"), func() {
42+
It("connect to clusters with UniversalClient and UnstableResp3", Label("NonRedisEnterprise"), func() {
4343
client = redis.NewUniversalClient(&redis.UniversalOptions{
4444
Addrs: cluster.addrs(),
4545
Protocol: 3,
@@ -49,4 +49,15 @@ var _ = Describe("UniversalClient", func() {
4949
a := func() { client.FTInfo(ctx, "all").Result() }
5050
Expect(a).ToNot(Panic())
5151
})
52+
53+
It("connect to clusters with ClusterClient and UnstableResp3", Label("NonRedisEnterprise"), func() {
54+
client = redis.NewClusterClient(&redis.ClusterOptions{
55+
Addrs: cluster.addrs(),
56+
Protocol: 3,
57+
UnstableResp3: true,
58+
})
59+
Expect(client.Ping(ctx).Err()).NotTo(HaveOccurred())
60+
a := func() { client.FTInfo(ctx, "all").Result() }
61+
Expect(a).ToNot(Panic())
62+
})
5263
})

0 commit comments

Comments
 (0)