[
https://issues.apache.org/jira/browse/GEODE-8864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17295379#comment-17295379
]
ASF GitHub Bot commented on GEODE-8864:
---------------------------------------
jhutchison commented on a change in pull request #5954:
URL: https://github.com/apache/geode/pull/5954#discussion_r587609738
##########
File path:
geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/HScanIntegrationTest.java
##########
@@ -37,22 +44,58 @@ public int getPort() {
return server.getPort();
}
+
+ // Note: these tests will not pass native redis, so included here in
concrete test class
+ @Test
+ public void givenCursorGreaterThanIntMaxValue_returnsCursorError() {
+ int largestCursorValue = Integer.MAX_VALUE;
+
+ BigInteger tooBigCursor =
+ new
BigInteger(String.valueOf(largestCursorValue)).add(BigInteger.valueOf(1));
+
+ assertThatThrownBy(() -> jedis.hscan("a", tooBigCursor.toString()))
+ .hasMessageContaining(ERROR_CURSOR);
+ }
+
+ @Test
+ public void givenCursorLessThanIntMinValue_returnsCursorError() {
+ int smallestCursorValue = Integer.MIN_VALUE;
+
+ BigInteger tooSmallCursor =
+ new
BigInteger(String.valueOf(smallestCursorValue)).subtract(BigInteger.valueOf(1));
+
+ assertThatThrownBy(() -> jedis.hscan("a", tooSmallCursor.toString()))
+ .hasMessageContaining(ERROR_CURSOR);
+ }
+
+
@Test
- public void
givenDifferentCursorThanSpecifiedByPreviousHscan_returnsAllEntries() {
+ public void givenCount_shouldReturnsExpectedNumberOfEntries() {
Review comment:
oops. thanks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> finish implementation of Redis HScan Command
> --------------------------------------------
>
> Key: GEODE-8864
> URL: https://issues.apache.org/jira/browse/GEODE-8864
> Project: Geode
> Issue Type: New Feature
> Components: redis
> Reporter: John Hutchison
> Priority: Major
> Labels: blocks-1.14.0, pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)