dschneider-pivotal commented on a change in pull request #6760:
URL: https://github.com/apache/geode/pull/6760#discussion_r691554375
##########
File path:
geode-apis-compatible-with-redis/src/test/java/org/apache/geode/redis/internal/data/RedisSortedSetTest.java
##########
@@ -139,46 +140,52 @@ public void
equals_returnsTrue_givenDifferentEmptySortedSets() {
}
@Test
- public void zadd_stores_delta_that_is_stable() throws IOException {
+ public void zadd_stores_delta_that_is_stable() {
Region<RedisKey, RedisData> region = uncheckedCast(mock(Region.class));
+ when(region.put(any(), any())).thenAnswer(invocation -> {
+ RedisSortedSet value = invocation.getArgument(1, RedisSortedSet.class);
+ assertThat(value.hasDelta()).isTrue();
+ HeapDataOutputStream out = new HeapDataOutputStream(100);
+ value.toDelta(out);
+ ByteArrayDataInput in = new ByteArrayDataInput(out.toByteArray());
+ RedisSortedSet sortedSet2 = createRedisSortedSet("3.14159", "v1",
"2.71828", "v2");
+ assertThat(sortedSet2).isNotEqualTo(value);
+ sortedSet2.fromDelta(in);
+ assertThat(sortedSet2).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]