dschneider-pivotal commented on a change in pull request #6760:
URL: https://github.com/apache/geode/pull/6760#discussion_r691554233
##########
File path:
geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/data/RedisHashTest.java
##########
@@ -123,62 +124,86 @@ public void
equals_returnsTrue_givenDifferentEmptyHashes() {
/************* HSET *************/
@SuppressWarnings("unchecked")
@Test
- public void hset_stores_delta_that_is_stable() throws IOException {
+ public void hset_stores_delta_that_is_stable() {
Region<RedisKey, RedisData> region = Mockito.mock(Region.class);
+ when(region.put(any(), any())).thenAnswer(invocation -> {
+ RedisHash value = invocation.getArgument(1, RedisHash.class);
+ assertThat(value.hasDelta()).isTrue();
+ HeapDataOutputStream out = new HeapDataOutputStream(100);
+ value.toDelta(out);
+ ByteArrayDataInput in = new ByteArrayDataInput(out.toByteArray());
+ RedisHash o2 = createRedisHash("k1", "v1", "k2", "v2");
+ assertThat(o2).isNotEqualTo(value);
+ o2.fromDelta(in);
+ assertThat(o2).isEqualTo(value);
+ return null;
+ });
Review comment:
Yes and it now is
--
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]