Skip to content

Commit 417d72c

Browse files
committed
guard sharded pub/sub tests to v7
1 parent e9523c3 commit 417d72c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/StackExchange.Redis.Tests/ClusterTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ public void ConnectIncludesSubscriber()
753753
public async Task TestShardedPubsubSubscriberAgainstReconnects()
754754
{
755755
var channel = RedisChannel.Sharded("testShardChannel");
756-
using var conn = Create(allowAdmin: true, keepAlive: 1, connectTimeout: 3000, shared: false);
756+
using var conn = Create(allowAdmin: true, keepAlive: 1, connectTimeout: 3000, shared: false, require: RedisFeatures.v7_0_0_rc1);
757757
Assert.True(conn.IsConnected);
758758
var db = conn.GetDatabase();
759759
Assert.Equal(0, await db.PublishAsync(channel, "noClientReceivesThis"));
@@ -807,7 +807,7 @@ public async Task TestShardedPubsubSubscriberAgainstReconnects()
807807
public async Task TestShardedPubsubSubscriberAgainsHashSlotMigration()
808808
{
809809
var channel = RedisChannel.Sharded("testShardChannel");
810-
using var conn = Create(allowAdmin: true, keepAlive: 1, connectTimeout: 3000, shared: false);
810+
using var conn = Create(allowAdmin: true, keepAlive: 1, connectTimeout: 3000, shared: false, require: RedisFeatures.v7_0_0_rc1);
811811
Assert.True(conn.IsConnected);
812812
var db = conn.GetDatabase();
813813
Assert.Equal(0, await db.PublishAsync(channel, "noClientReceivesThis"));
@@ -918,7 +918,7 @@ public async Task ClusterPubSub(bool sharded)
918918
{
919919
var guid = Guid.NewGuid().ToString();
920920
var channel = sharded ? RedisChannel.Sharded(guid) : RedisChannel.Literal(guid);
921-
using var conn = Create(keepAlive: 1, connectTimeout: 3000, shared: false);
921+
using var conn = Create(keepAlive: 1, connectTimeout: 3000, shared: false, require: sharded ? RedisFeatures.v7_0_0_rc1 : RedisFeatures.v2_0_0);
922922
Assert.True(conn.IsConnected);
923923

924924
var pubsub = conn.GetSubscriber();

0 commit comments

Comments
 (0)