jchen21 commented on a change in pull request #7199:
URL: https://github.com/apache/geode/pull/7199#discussion_r769052845



##########
File path: 
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
##########
@@ -1327,8 +1327,19 @@ public void testRecoverAfterConflict() {
 
     vm0.invoke(() -> {
       // This should work now
-      createReplicateRegion(regionName, getDiskDirs(getVMId()));
-      updateEntry("A", "C");
+      try {
+        createReplicateRegion(regionName, getDiskDirs(getVMId()));
+        updateEntry("A", "C");
+      } catch (CacheClosedException cacheClosedException) {

Review comment:
       The question is how we can tell the cache is already closed or is in the 
process of closing, before recreating the region. There is some subtle 
difference. `GemFireCacheImpl.isClosed()` returns `true`, even when the bug 
occurs. So we can't depend on the flag `GemFireCacheImpl.isClosed()`. I have 
also tried to check if the cache is `null`. Not a good idea either. I probably 
have to do something similar to `cancelInProgress`.




-- 
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