mirror of
https://github.com/redis/go-redis.git
synced 2025-08-07 12:42:55 +03:00
fix: add unstableresp3 to cluster client (#3266)
* fix: add unstableresp3 to cluster client * propagate unstableresp3 * proper test that will ignore error, but fail if client panics * add separate test for clusterclient constructor
This commit is contained in:
@@ -38,4 +38,26 @@ var _ = Describe("UniversalClient", func() {
|
||||
})
|
||||
Expect(client.Ping(ctx).Err()).NotTo(HaveOccurred())
|
||||
})
|
||||
|
||||
It("connect to clusters with UniversalClient and UnstableResp3", Label("NonRedisEnterprise"), func() {
|
||||
client = redis.NewUniversalClient(&redis.UniversalOptions{
|
||||
Addrs: cluster.addrs(),
|
||||
Protocol: 3,
|
||||
UnstableResp3: true,
|
||||
})
|
||||
Expect(client.Ping(ctx).Err()).NotTo(HaveOccurred())
|
||||
a := func() { client.FTInfo(ctx, "all").Result() }
|
||||
Expect(a).ToNot(Panic())
|
||||
})
|
||||
|
||||
It("connect to clusters with ClusterClient and UnstableResp3", Label("NonRedisEnterprise"), func() {
|
||||
client = redis.NewClusterClient(&redis.ClusterOptions{
|
||||
Addrs: cluster.addrs(),
|
||||
Protocol: 3,
|
||||
UnstableResp3: true,
|
||||
})
|
||||
Expect(client.Ping(ctx).Err()).NotTo(HaveOccurred())
|
||||
a := func() { client.FTInfo(ctx, "all").Result() }
|
||||
Expect(a).ToNot(Panic())
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user