kirklund commented on a change in pull request #6854:
URL: https://github.com/apache/geode/pull/6854#discussion_r707761362



##########
File path: 
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
##########
@@ -3857,10 +3856,25 @@ public void run2() throws CacheException {
       // responses.
     } finally {
       Wait.pause(1500);
+      vm0.invoke("Flush disk store",
+          () -> flushDiskStore(name));
+      vm1.invoke("Flush disk store",
+          () -> flushDiskStore(name));
+      vm2.invoke("Flush disk store",
+          () -> flushDiskStore(name));

Review comment:
       This is ok, You could also combine these if you want:
   ```
   Stream.of(vm0, vm1, vm3).forEach(vm -> vm.invoke(() -> 
flushDiskStore(name)));
   ```
   

##########
File path: 
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
##########
@@ -3857,10 +3856,25 @@ public void run2() throws CacheException {
       // responses.
     } finally {
       Wait.pause(1500);
+      vm0.invoke("Flush disk store",
+          () -> flushDiskStore(name));
+      vm1.invoke("Flush disk store",
+          () -> flushDiskStore(name));
+      vm2.invoke("Flush disk store",
+          () -> flushDiskStore(name));
       unregisterAllSerializers();
     }
   }
 
+  private void flushDiskStore(String name) {
+    if (getRootRegion() != null && getRootRegion().getSubregion(name) != null) 
{
+      DiskStoreImpl diskStore = ((LocalRegion) 
getRootRegion().getSubregion(name)).getDiskStore();

Review comment:
       Please cast to `DiskRecoveryStore` instead of `LocalRegion`. I'm trying 
to replace all casts to `LocalRegion` to casts with interfaces.




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