[ 
https://issues.apache.org/jira/browse/GEODE-8857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272240#comment-17272240
 ] 

ASF GitHub Bot commented on GEODE-8857:
---------------------------------------

jdeppe-pivotal commented on a change in pull request #5949:
URL: https://github.com/apache/geode/pull/5949#discussion_r564668013



##########
File path: 
geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/AbstractSMoveIntegrationTest.java
##########
@@ -80,6 +81,17 @@ public void 
givenMoreThanFourArguments_returnsWrongNumberOfArgumentsError() {
             .hasMessageContaining("ERR wrong number of arguments for 'smove' 
command");
   }
 
+  @Test
+  public void testSmove_returnsWrongType_whenWrongTypeIsUsed() {
+    jedis.set("not-a-set", "value");
+    assertThatThrownBy(() -> jedis.smove("not-a-set", "some-set", "foo"))
+        .hasMessage("WRONGTYPE " + RedisConstants.ERROR_WRONG_TYPE);
+
+    jedis.hset("not-another-set", "field", "value");
+    assertThatThrownBy(() -> jedis.smove("not-another-set", "some-set", "foo"))
+        .hasMessage("WRONGTYPE " + RedisConstants.ERROR_WRONG_TYPE);
+  }

Review comment:
       Yes, I've already fixed that and added a test :)




----------------------------------------------------------------
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:
us...@infra.apache.org


> Redis SMOVE command should not do type checking in the executor
> ---------------------------------------------------------------
>
>                 Key: GEODE-8857
>                 URL: https://issues.apache.org/jira/browse/GEODE-8857
>             Project: Geode
>          Issue Type: Improvement
>          Components: redis
>            Reporter: Jens Deppe
>            Priority: Major
>              Labels: pull-request-available
>
> Since there is a type check in the executor, it results in stats 
> (hits/misses) being updated which is not desirable.
> Since there are already set-type checks in place for when a set is retrieved 
> this check should not be necessary.
> Add a test case for this to {{AbstractSMoveIntegrationTest}} and remove any 
> relevant {{@Ignores}} in {{AbstractHistsMissesIntegrationTest}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to