dschneider-pivotal commented on a change in pull request #6760:
URL: https://github.com/apache/geode/pull/6760#discussion_r691559424



##########
File path: 
geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/data/RedisSetTest.java
##########
@@ -128,57 +129,81 @@ public void equals_returnsTrue_givenDifferentEmptySets() {
   }
 
   @Test
-  public void sadd_stores_delta_that_is_stable() throws IOException {
+  public void sadd_stores_delta_that_is_stable() {
     Region<RedisKey, RedisData> region = uncheckedCast(mock(Region.class));
+    when(region.put(any(), any())).thenAnswer(invocation -> {
+      RedisSet value = invocation.getArgument(1, RedisSet.class);
+      assertThat(value.hasDelta()).isTrue();
+      HeapDataOutputStream out = new HeapDataOutputStream(100);
+      value.toDelta(out);
+      ByteArrayDataInput in = new ByteArrayDataInput(out.toByteArray());
+      RedisSet set2 = createRedisSet(1, 2);
+      assertThat(set2).isNotEqualTo(value);
+      set2.fromDelta(in);
+      assertThat(set2).isEqualTo(value);
+      return null;
+    });

Review comment:
       done




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to