BalaKaza commented on a change in pull request #7278:
URL: https://github.com/apache/geode/pull/7278#discussion_r788973072
##########
File path:
geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSScanIntegrationTest.java
##########
@@ -156,152 +222,172 @@ public void
givenNonexistentKey_andCursorIsNotInteger_returnsInvalidCursorError(
@Test
public void
givenExistentSetKey_andCursorIsNotAnInteger_returnsInvalidCursorError() {
- jedis.set("a", "b");
+ jedis.set(KEY, "b");
- assertThatThrownBy(() -> jedis.sendCommand("a", Protocol.Command.SSCAN,
"a", "sjfls"))
+ assertThatThrownBy(() -> jedis.sendCommand(KEY, Protocol.Command.SSCAN,
KEY, "sjfls"))
.hasMessageContaining(ERROR_CURSOR);
}
@Test
public void givenNonexistentKey_returnsEmptyArray() {
- ScanResult<String> result = jedis.sscan("nonexistent", "0");
+ ScanResult<String> result = jedis.sscan("nonexistent", ZERO_CURSOR);
assertThat(result.isCompleteIteration()).isTrue();
assertThat(result.getResult()).isEmpty();
}
+ @Test
+ public void givenNegativeCursor_returnsEntriesUsingAbsoluteValueOfCursor() {
Review comment:
So at the moment we just return the same output as the positive cursor
and that is okay?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]