jdeppe-pivotal commented on a change in pull request #5945:
URL: https://github.com/apache/geode/pull/5945#discussion_r562730365



##########
File path: 
geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/hash/AbstractHashesIntegrationTest.java
##########
@@ -111,6 +111,22 @@ public void testHMSet() {
     assertThat(jedis.hlen(key)).isEqualTo(hash.size());
   }
 
+  @Test
+  public void testHMSetErrorMessage_givenIncorrectDataType() {
+    Map<String, String> animalMap = new HashMap<>();
+    animalMap.put("chicken", "eggs");
+
+    jedis.set("farm", "chicken");
+    assertThatThrownBy(() -> jedis.hmset("farm", animalMap))
+        .isInstanceOf(JedisDataException.class)
+        .hasMessageContaining("WRONGTYPE Operation against a key holding the 
wrong kind of value");
+
+    jedis.sadd("zoo", "elephant");
+    assertThatThrownBy(() -> jedis.hmset("zoo", animalMap))
+        .isInstanceOf(JedisDataException.class)
+        .hasMessageContaining("WRONGTYPE Operation against a key holding the 
wrong kind of value");

Review comment:
       I think I just did this in the HVALS 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]


Reply via email to