Kris-10-0 commented on a change in pull request #7319: URL: https://github.com/apache/geode/pull/7319#discussion_r794100445
########## File path: geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/set/AbstractSPopIntegrationTest.java ########## @@ -52,213 +56,137 @@ public void tearDown() { } @Test - public void givenKeyNotProvided_returnsWrongNumberOfArgumentsError() { - assertThatThrownBy(() -> jedis.sendCommand("key", Protocol.Command.SPOP)) - .hasMessageContaining("ERR wrong number of arguments for 'spop' command"); + public void spopTooFewArgs_returnsError() { + assertAtLeastNArgs(jedis, Protocol.Command.SPOP, 1); } @Test - public void givenMoreThanThreeArguments_returnsSyntaxError() { + public void spopTooManyArgs_returnsError() { assertThatThrownBy( - () -> jedis.sendCommand("key", Protocol.Command.SPOP, "key", "NaN", "extraArg")) + () -> jedis.sendCommand(SET_KEY, Protocol.Command.SPOP, SET_KEY, "5", "5")) .hasMessageContaining(ERROR_SYNTAX); Review comment: By just calling that method or assertThatThrownBy(() ->RedisCommandArgumentsTestHelper.assertAtMostNArgs()).hasMessageContaining(ERROR_SYNTAX); When I was using RedisCommandArgumentsTestHelper.assertAtMostNArgs() on it's own it failed both the native and integration 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. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org