sabbey37 commented on a change in pull request #5939:
URL: https://github.com/apache/geode/pull/5939#discussion_r562209464
##########
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:
Thanks for adding these! I made this comment in the `HSETNX` PR as well:
I know for most of the other commands (del, getset, exists, etc.) we check
the error message more closely, like:
```
.hasMessageContaining("ERR wrong number of arguments for 'get' command");
```
I'm not sure if it's necessary, but maybe we could do the same here to be
consistent? I realize there are a few areas where we're still just checking
`wrong number of arguments`. We could eventually change those in a different PR.
----------------------------------------------------------------
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]