nonbinaryprogrammer commented on a change in pull request #5939:
URL: https://github.com/apache/geode/pull/5939#discussion_r564114406
##########
File path:
geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/AbstractHashesIntegrationTest.java
##########
@@ -199,6 +199,16 @@ public void testHStrLen_failsForNonHashes() {
.hasMessageContaining("WRONGTYPE");
}
+ @Test
+ public void testHStrlen_givenWrongNumberOfArguments() {
+ assertThatThrownBy(() -> jedis.sendCommand(Protocol.Command.HSTRLEN))
+ .hasMessageContaining("wrong number of arguments");
+ assertThatThrownBy(() -> jedis.sendCommand(Protocol.Command.HSTRLEN, "1"))
+ .hasMessageContaining("wrong number of arguments");
+ assertThatThrownBy(() -> jedis.sendCommand(Protocol.Command.HSTRLEN, "1",
"2", "3"))
+ .hasMessageContaining("wrong number of arguments");
+ }
+
Review comment:
I second this. It would be pretty awkward to return an error message for
the wrong command
----------------------------------------------------------------
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]