diff --git a/src/main/java/org/springframework/data/redis/connection/srp/SrpConnection.java b/src/main/java/org/springframework/data/redis/connection/srp/SrpConnection.java index 1055615db..8a6387354 100644 --- a/src/main/java/org/springframework/data/redis/connection/srp/SrpConnection.java +++ b/src/main/java/org/springframework/data/redis/connection/srp/SrpConnection.java @@ -1504,10 +1504,10 @@ public class SrpConnection implements RedisConnection { try { byte[] limit = SrpUtils.limit(offset, count); if (isPipelined()) { - pipeline(pipeline.zrevrangebyscore(key, min, max, null, limit)); + pipeline(pipeline.zrevrangebyscore(key, max, min, null, limit)); return null; } - return SrpUtils.toSet(client.zrevrangebyscore(key, min, max, null, limit).data()); + return SrpUtils.toSet(client.zrevrangebyscore(key, max, min, null, limit).data()); } catch (Exception ex) { throw convertSrpAccessException(ex); } @@ -1517,10 +1517,10 @@ public class SrpConnection implements RedisConnection { public Set zRevRangeByScore(byte[] key, double min, double max) { try { if (isPipelined()) { - pipeline(pipeline.zrevrangebyscore(key, min, max, null, null)); + pipeline(pipeline.zrevrangebyscore(key, max, min, null, null)); return null; } - return SrpUtils.toSet(client.zrevrangebyscore(key, min, max, null, null).data()); + return SrpUtils.toSet(client.zrevrangebyscore(key, max, min, null, null).data()); } catch (Exception ex) { throw convertSrpAccessException(ex); } @@ -1531,10 +1531,10 @@ public class SrpConnection implements RedisConnection { try { byte[] limit = SrpUtils.limit(offset, count); if (isPipelined()) { - pipeline(pipeline.zrevrangebyscore(key, min, max, SrpUtils.WITHSCORES, limit)); + pipeline(pipeline.zrevrangebyscore(key, max, min, SrpUtils.WITHSCORES, limit)); return null; } - return SrpUtils.convertTuple(client.zrevrangebyscore(key, min, max, SrpUtils.WITHSCORES, limit)); + return SrpUtils.convertTuple(client.zrevrangebyscore(key, max, min, SrpUtils.WITHSCORES, limit)); } catch (Exception ex) { throw convertSrpAccessException(ex); } @@ -1544,10 +1544,10 @@ public class SrpConnection implements RedisConnection { public Set zRevRangeByScoreWithScores(byte[] key, double min, double max) { try { if (isPipelined()) { - pipeline(pipeline.zrevrangebyscore(key, min, max, SrpUtils.WITHSCORES, null)); + pipeline(pipeline.zrevrangebyscore(key, max, min, SrpUtils.WITHSCORES, null)); return null; } - return SrpUtils.convertTuple(client.zrevrangebyscore(key, min, max, SrpUtils.WITHSCORES, null)); + return SrpUtils.convertTuple(client.zrevrangebyscore(key, max, min, SrpUtils.WITHSCORES, null)); } catch (Exception ex) { throw convertSrpAccessException(ex); } diff --git a/src/test/java/org/springframework/data/redis/connection/srp/SrpConnectionIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/srp/SrpConnectionIntegrationTests.java index e13296aa7..e52476a33 100644 --- a/src/test/java/org/springframework/data/redis/connection/srp/SrpConnectionIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/srp/SrpConnectionIntegrationTests.java @@ -81,14 +81,22 @@ public class SrpConnectionIntegrationTests extends AbstractConnectionIntegration public void testGetConfig() { } - @Ignore("DATAREDIS-152 Syntax error on zRangeByScore and and zRangeByScoreWithScores when using offset and count") + @Ignore("DATAREDIS-152 Syntax error on zRangeByScore when using offset and count") public void testZRangeByScoreOffsetCount() { } - @Ignore("DATAREDIS-152 Syntax error on zRangeByScore and and zRangeByScoreWithScores when using offset and count") + @Ignore("DATAREDIS-152 Syntax error on zRangeByScoreWithScores when using offset and count") public void testZRangeByScoreWithScoresOffsetCount() { } + @Ignore("DATAREDIS-152 Syntax error on zRevRangeByScore when using offset and count") + public void testZRevRangeByScoreOffsetCount() { + } + + @Ignore("DATAREDIS-152 Syntax error on zRevRangeByScoreWithScores when using offset and count") + public void testZRevRangeByScoreWithScoresOffsetCount() { + } + @Ignore("DATAREDIS-156 SRP bRPopLPush ClassCastException") public void testBRPopLPushTimeout() { } diff --git a/src/test/java/org/springframework/data/redis/connection/srp/SrpConnectionPipelineIntegrationTests.java b/src/test/java/org/springframework/data/redis/connection/srp/SrpConnectionPipelineIntegrationTests.java index 6944e86f0..3da9a1133 100644 --- a/src/test/java/org/springframework/data/redis/connection/srp/SrpConnectionPipelineIntegrationTests.java +++ b/src/test/java/org/springframework/data/redis/connection/srp/SrpConnectionPipelineIntegrationTests.java @@ -82,14 +82,22 @@ public class SrpConnectionPipelineIntegrationTests extends public void testGetConfig() { } - @Ignore("DATAREDIS-152 Syntax error on zRangeByScore and and zRangeByScoreWithScores when using offset and count") + @Ignore("DATAREDIS-152 Syntax error on zRangeByScore when using offset and count") public void testZRangeByScoreOffsetCount() { } - @Ignore("DATAREDIS-152 Syntax error on zRangeByScore and and zRangeByScoreWithScores when using offset and count") + @Ignore("DATAREDIS-152 Syntax error on zRangeByScoreWithScores when using offset and count") public void testZRangeByScoreWithScoresOffsetCount() { } + @Ignore("DATAREDIS-152 Syntax error on zRevRangeByScore when using offset and count") + public void testZRevRangeByScoreOffsetCount() { + } + + @Ignore("DATAREDIS-152 Syntax error on zRevRangeByScoreWithScores when using offset and count") + public void testZRevRangeByScoreWithScoresOffsetCount() { + } + @Test(expected = UnsupportedOperationException.class) public void testZInterStoreAggWeights() { super.testZInterStoreAggWeights();