|
80 | 80 | import org.springframework.data.redis.serializer.RedisSerializer;
|
81 | 81 | import org.springframework.data.redis.test.condition.EnabledOnCommand;
|
82 | 82 | import org.springframework.data.redis.test.condition.EnabledOnRedisDriver;
|
| 83 | +import org.springframework.data.redis.test.condition.EnabledOnRedisVersion; |
83 | 84 | import org.springframework.data.redis.test.condition.LongRunningTest;
|
84 | 85 | import org.springframework.data.redis.test.condition.RedisDriver;
|
85 | 86 | import org.springframework.data.redis.test.util.HexStringUtils;
|
@@ -1286,6 +1287,16 @@ void testLPop() {
|
1286 | 1287 | verifyResults(Arrays.asList(new Object[] { 1L, 2L, "hello" }));
|
1287 | 1288 | }
|
1288 | 1289 |
|
| 1290 | + @Test // GH-1987 |
| 1291 | + @EnabledOnRedisVersion("6.2") |
| 1292 | + void testLPopWithCount() { |
| 1293 | + actual.add(connection.rPush("PopList", "hello")); |
| 1294 | + actual.add(connection.rPush("PopList", "world")); |
| 1295 | + actual.add(connection.rPush("PopList", "42")); |
| 1296 | + actual.add(connection.lPop("PopList", 2)); |
| 1297 | + verifyResults(Arrays.asList(new Object[] { 1L, 2L, 3L, Arrays.asList("hello", "world") })); |
| 1298 | + } |
| 1299 | + |
1289 | 1300 | @Test
|
1290 | 1301 | void testLRem() {
|
1291 | 1302 | actual.add(connection.rPush("PopList", "hello"));
|
@@ -1335,6 +1346,16 @@ void testRPop() {
|
1335 | 1346 | verifyResults(Arrays.asList(new Object[] { 1L, 2L, "world" }));
|
1336 | 1347 | }
|
1337 | 1348 |
|
| 1349 | + @Test // GH-1987 |
| 1350 | + @EnabledOnRedisVersion("6.2") |
| 1351 | + void testRPopWithCount() { |
| 1352 | + actual.add(connection.rPush("PopList", "hello")); |
| 1353 | + actual.add(connection.rPush("PopList", "world")); |
| 1354 | + actual.add(connection.rPush("PopList", "42")); |
| 1355 | + actual.add(connection.rPop("PopList", 2)); |
| 1356 | + verifyResults(Arrays.asList(new Object[] { 1L, 2L, 3L, Arrays.asList("42", "world") })); |
| 1357 | + } |
| 1358 | + |
1338 | 1359 | @Test
|
1339 | 1360 | void testRPopLPush() {
|
1340 | 1361 | actual.add(connection.rPush("PopList", "hello"));
|
|
0 commit comments