You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/06/09 19:02:18 UTC

[GitHub] [geode] agingade commented on a diff in pull request #7211: GEODE-10354: Convert enum like classes to enum.

agingade commented on code in PR #7211:
URL: https://github.com/apache/geode/pull/7211#discussion_r893861404


##########
geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put70Test.java:
##########
@@ -328,14 +325,14 @@ void shouldSetPossibleDuplicateReturnsTrueIfNotRecoveredVersionTagAndWithPersist
 
   @Test
   void isRegionWithPersistenceReturnsTrueIfDataPolicyWithPersistence() {
-    when(dataPolicy.withPersistence()).thenReturn(true);
+    when(attributes.getDataPolicy()).thenReturn(DataPolicy.PERSISTENT_REPLICATE);
 
     assertThat(put70.isRegionWithPersistence(localRegion)).isTrue();
   }
 
   @Test
   void isRegionWithPersistenceReturnsTrueIfIsAccessorAndHavingPersistentMembers() {
-    when(dataPolicy.withPersistence()).thenReturn(false);
+    when(attributes.getDataPolicy()).thenReturn(DataPolicy.PARTITION);

Review Comment:
   The older code seems to be looking to know if its configured with persistent data-policy.
   The new change is different than that. Is it what is expected in the test.
   In the previous above change; for the same old code its returning DataPolicy.PERSISTENT_REPLICATE.
   Same comment with following two changes in this file. 



-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org