agingade commented on a change in pull request #7199:
URL: https://github.com/apache/geode/pull/7199#discussion_r770904918
##########
File path:
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
##########
@@ -1320,6 +1320,7 @@ public void testRecoverAfterConflict() {
createReplicateRegion(regionName, getDiskDirs(getVMId()));
});
assertThat(thrown).isInstanceOf(ConflictingPersistentDataException.class);
+ InternalDistributedSystem.getAnyInstance().getCache().close();
Review comment:
Getting the cache using InternalDistributedSystem will work; but still
looks some indirect way of closing the cache....
Can this work:
Get the cache reference; try creating the region and then call close on the
cache reference.
vm0.invoke(() -> {
cache = getCache();
try (IgnoredException ie =
addIgnoredException(ConflictingPersistentDataException.class)) {
// this should cause a conflict
Throwable thrown = catchThrowable(() -> {
createReplicateRegion(regionName, getDiskDirs(getVMId()));
});
assertThat(thrown).isInstanceOf(ConflictingPersistentDataException.class);
}
cache.close();
});
--
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]