sabbey37 commented on a change in pull request #5949:
URL: https://github.com/apache/geode/pull/5949#discussion_r564617577
##########
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:
Looks like the Redis tests are failing when a destination key of the
wrong type is specified (vs. the source key). Could we write tests for that as
well?
----------------------------------------------------------------
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]