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

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

ringles commented on a change in pull request #5940:
URL: https://github.com/apache/geode/pull/5940#discussion_r562106269



##########
File path: 
geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/AbstractHashesIntegrationTest.java
##########
@@ -365,6 +365,28 @@ public void testHSetNXExecutor() {
 
   }
 
+  @Test
+  public void hsetNX_shouldThrowErrorIfKeyIsWrongType() {
+    String string_key = "String_Key";
+    String set_key = "Set_Key";
+    String field = "field";
+    String value = "value";
+
+    jedis.set(string_key, value);
+    jedis.sadd(set_key, field);
+
+    assertThatThrownBy(
+        () -> jedis.hsetnx(string_key, field, "something else"))
+            .isInstanceOf(JedisDataException.class)
+            .hasMessageContaining("WRONGTYPE");

Review comment:
       Good call on the argument count check, I did that for the HSTRLEN PR 
that's currently pending, too!
   
   Think I might add a story for the WRONGTYPE messages, since that will touch 
a bunch of otherwise-unrelated commands.




----------------------------------------------------------------
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


> Unit/Integration tests for HSETNX command
> -----------------------------------------
>
>                 Key: GEODE-8858
>                 URL: https://issues.apache.org/jira/browse/GEODE-8858
>             Project: Geode
>          Issue Type: Test
>          Components: redis
>            Reporter: Raymond Ingles
>            Priority: Major
>              Labels: pull-request-available
>
> Flesh out unit/integration tests for Redis HSETNX command.



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

Reply via email to