Fix RJC zRevRangeWithScores returns incorrect results

DATAREDIS-137
This commit is contained in:
Jennifer Hickey
2013-04-01 10:27:39 -07:00
parent 97ebd34b2d
commit a421238403
3 changed files with 2 additions and 12 deletions

View File

@@ -1670,16 +1670,14 @@ public class RjcConnection implements RedisConnection {
public Set<Tuple> zRevRangeWithScores(byte[] key, long start, long end) {
String stringKey = RjcUtils.decode(key);
String minString = Long.toString(start);
String maxString = Long.toString(end);
try {
if (isPipelined()) {
pipeline.zrevrangeByScoreWithScores(stringKey, minString, maxString);
pipeline.zrevrangeWithScores(stringKey, (int) start, (int) end);
return null;
}
return RjcUtils.convertElementScore(session.zrevrangeByScoreWithScores(stringKey, minString, maxString));
return RjcUtils.convertElementScore(session.zrevrangeWithScores(stringKey, (int) start, (int) end));
} catch (Exception ex) {
throw convertRjcAccessException(ex);
}

View File

@@ -104,10 +104,6 @@ public class RjcConnectionIntegrationTests extends AbstractConnectionIntegration
public void testPubSubWithPatterns() {
}
@Ignore("DATAREDIS-137 zRevRangeWithScores returns incorrect results")
public void testZRevRangeWithScores() {
}
@Ignore("DATAREDIS-148 Syntax error on RJC zUnionStore")
public void testZUnionStoreAggWeights() {
}

View File

@@ -85,10 +85,6 @@ public class RjcConnectionPipelineIntegrationTests extends
public void testStrLen() {
}
@Ignore("DATAREDIS-137 zRevRangeWithScores returns incorrect results")
public void testZRevRangeWithScores() {
}
@Ignore("DATAREDIS-148 Syntax error on RJC zUnionStore")
public void testZUnionStoreAggWeights() {
}