Skip to content

Commit fa9f0e0

Browse files
Guard BITOP test for new options with version flag.
See: #3250
1 parent f53d60d commit fa9f0e0

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

src/test/java/org/springframework/data/redis/connection/AbstractConnectionIntegrationTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ void testBitOpNotMultipleSources() {
577577
}
578578

579579
@Test // GH-3250
580+
@EnabledOnRedisVersion("8.2")
580581
void testBitOpDiff() {
581582

582583
actual.add(connection.set("key1", "foobar"));
@@ -586,6 +587,7 @@ void testBitOpDiff() {
586587
}
587588

588589
@Test // GH-3250
590+
@EnabledOnRedisVersion("8.2")
589591
void testBitOpDiff1() {
590592

591593
actual.add(connection.set("key1", "foobar"));
@@ -595,6 +597,7 @@ void testBitOpDiff1() {
595597
}
596598

597599
@Test // GH-3250
600+
@EnabledOnRedisVersion("8.2")
598601
void testBitOpAndor() {
599602

600603
actual.add(connection.set("key1", "foo"));
@@ -604,6 +607,7 @@ void testBitOpAndor() {
604607
}
605608

606609
@Test // GH-3250
610+
@EnabledOnRedisVersion("8.2")
607611
void testBitOpOne() {
608612

609613
actual.add(connection.set("key1", "foo"));

src/test/java/org/springframework/data/redis/connection/jedis/JedisClusterConnectionTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import static org.springframework.data.redis.connection.RedisZSetCommands.*;
2828
import static org.springframework.data.redis.core.ScanOptions.*;
2929

30+
import org.springframework.data.redis.test.condition.EnabledOnRedisVersion;
3031
import redis.clients.jedis.ConnectionPool;
3132
import redis.clients.jedis.HostAndPort;
3233
import redis.clients.jedis.Jedis;
@@ -225,6 +226,7 @@ void bitOpNotShouldWorkCorrectly() {
225226
}
226227

227228
@Test // GH-3250
229+
@EnabledOnRedisVersion("8.2")
228230
void bitOpDiffShouldWorkCorrectly() {
229231

230232
nativeConnection.set(SAME_SLOT_KEY_1, "foobar");
@@ -236,6 +238,7 @@ void bitOpDiffShouldWorkCorrectly() {
236238
}
237239

238240
@Test // GH-3250
241+
@EnabledOnRedisVersion("8.2")
239242
void bitOpDiff1ShouldWorkCorrectly() {
240243

241244
nativeConnection.set(SAME_SLOT_KEY_1, "foobar");
@@ -247,6 +250,7 @@ void bitOpDiff1ShouldWorkCorrectly() {
247250
}
248251

249252
@Test // GH-3250
253+
@EnabledOnRedisVersion("8.2")
250254
void bitOpAndorShouldWorkCorrectly() {
251255

252256
nativeConnection.set(SAME_SLOT_KEY_1, "foo");
@@ -258,6 +262,7 @@ void bitOpAndorShouldWorkCorrectly() {
258262
}
259263

260264
@Test // GH-3250
265+
@EnabledOnRedisVersion("8.2")
261266
void bitOpOneShouldWorkCorrectly() {
262267

263268
nativeConnection.set(SAME_SLOT_KEY_1, "foo");

src/test/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnectionTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
import org.springframework.data.redis.core.types.Expiration;
6767
import org.springframework.data.redis.test.condition.EnabledOnCommand;
6868
import org.springframework.data.redis.test.condition.EnabledOnRedisClusterAvailable;
69+
import org.springframework.data.redis.test.condition.EnabledOnRedisVersion;
6970
import org.springframework.data.redis.test.extension.LettuceExtension;
7071
import org.springframework.data.redis.test.extension.LettuceTestClientResources;
7172
import org.springframework.data.redis.test.util.HexStringUtils;
@@ -313,6 +314,7 @@ void bitOpNotShouldWorkCorrectly() {
313314
}
314315

315316
@Test // GH-3250
317+
@EnabledOnRedisVersion("8.2")
316318
void bitOpDiffShouldWorkCorrectly() {
317319

318320
nativeConnection.set(SAME_SLOT_KEY_1, "foobar");
@@ -324,6 +326,7 @@ void bitOpDiffShouldWorkCorrectly() {
324326
}
325327

326328
@Test // GH-3250
329+
@EnabledOnRedisVersion("8.2")
327330
void bitOpDiff1ShouldWorkCorrectly() {
328331

329332
nativeConnection.set(SAME_SLOT_KEY_1, "foobar");
@@ -335,6 +338,7 @@ void bitOpDiff1ShouldWorkCorrectly() {
335338
}
336339

337340
@Test // GH-3250
341+
@EnabledOnRedisVersion("8.2")
338342
void bitOpAndorShouldWorkCorrectly() {
339343

340344
nativeConnection.set(SAME_SLOT_KEY_1, "foo");
@@ -346,6 +350,7 @@ void bitOpAndorShouldWorkCorrectly() {
346350
}
347351

348352
@Test // GH-3250
353+
@EnabledOnRedisVersion("8.2")
349354
void bitOpOneShouldWorkCorrectly() {
350355

351356
nativeConnection.set(SAME_SLOT_KEY_1, "foo");

src/test/java/org/springframework/data/redis/connection/lettuce/LettuceReactiveClusterStringCommandsIntegrationTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.junit.jupiter.api.Test;
2727

2828
import org.springframework.data.redis.connection.RedisStringCommands;
29+
import org.springframework.data.redis.test.condition.EnabledOnRedisVersion;
2930

3031
/**
3132
* @author Christoph Strobl
@@ -113,6 +114,7 @@ void bitNotShouldThrowExceptionWhenMoreThanOnSourceKeyAndKeysMapToSameSlot() {
113114
}
114115

115116
@Test // GH-3250
117+
@EnabledOnRedisVersion("8.2")
116118
void bitOpDiffShouldWorkAsExpectedWhenKeysMapToSameSlot() {
117119

118120
nativeCommands.set(SAME_SLOT_KEY_1, "foobar");
@@ -124,6 +126,7 @@ void bitOpDiffShouldWorkAsExpectedWhenKeysMapToSameSlot() {
124126
}
125127

126128
@Test // GH-3250
129+
@EnabledOnRedisVersion("8.2")
127130
void bitOpDiff1ShouldWorkAsExpectedWhenKeysMapToSameSlot() {
128131

129132
nativeCommands.set(SAME_SLOT_KEY_1, "foobar");
@@ -135,6 +138,7 @@ void bitOpDiff1ShouldWorkAsExpectedWhenKeysMapToSameSlot() {
135138
}
136139

137140
@Test // GH-3250
141+
@EnabledOnRedisVersion("8.2")
138142
void bitOpAndorShouldWorkAsExpectedWhenKeysMapToSameSlot() {
139143

140144
nativeCommands.set(SAME_SLOT_KEY_1, VALUE_1);
@@ -146,6 +150,7 @@ void bitOpAndorShouldWorkAsExpectedWhenKeysMapToSameSlot() {
146150
}
147151

148152
@Test // GH-3250
153+
@EnabledOnRedisVersion("8.2")
149154
void bitOpOneShouldWorkAsExpectedWhenKeysMapToSameSlot() {
150155

151156
nativeCommands.set(SAME_SLOT_KEY_1, VALUE_1);

0 commit comments

Comments
 (0)