You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by mh...@apache.org on 2020/04/21 00:03:17 UTC

[geode] branch GEODE-7935 created (now f894cef)

This is an automated email from the ASF dual-hosted git repository.

mhanson pushed a change to branch GEODE-7935
in repository https://gitbox.apache.org/repos/asf/geode.git.


      at f894cef  GEODE-7935: Awaiting for verification steps.

This branch includes the following new commits:

     new f894cef  GEODE-7935: Awaiting for verification steps.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[geode] 01/01: GEODE-7935: Awaiting for verification steps.

Posted by mh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mhanson pushed a commit to branch GEODE-7935
in repository https://gitbox.apache.org/repos/asf/geode.git

commit f894cef2d084ae3ae6eaea3dd12da08c9208bb82
Author: Mark Hanson <mh...@pivotal.io>
AuthorDate: Mon Apr 20 17:02:29 2020 -0700

    GEODE-7935: Awaiting for verification steps.
---
 .../geode/internal/cache/GridAdvisorDUnitTest.java | 25 +++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GridAdvisorDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GridAdvisorDUnitTest.java
index 4967e34..9774f5c 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GridAdvisorDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GridAdvisorDUnitTest.java
@@ -19,6 +19,7 @@ import static org.apache.geode.distributed.ConfigurationProperties.GROUPS;
 import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
 import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL;
 import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -176,15 +177,15 @@ public class GridAdvisorDUnitTest extends JUnit4DistributedTestCase {
       }
     });
 
-    vm0.invoke(() -> stopLocatorAndCheckIt());
+    vm0.invoke(this::stopLocatorAndCheckIt);
 
     // now make sure everyone else saw the locator go away
-    vm3.invoke(() -> verifyLocatorStopped());
+    vm3.invoke(this::verifyLocatorStopped);
     vm2.invoke(() -> verifyBridgeServerSawLocatorStop(port2));
     vm1.invoke(() -> verifyBridgeServerSawLocatorStopWithName(port2));
 
     // restart bridge server 1 and see if controller sees it
-    vm1.invoke(() -> restartBridgeServer());
+    vm1.invoke(this::restartBridgeServer);
 
     vm3.invoke(() -> verifyBridgeServerRestart(bsPort1, bsPort2, bsPort3, bsPort4, "bs3Group1",
         "bs3Group2",
@@ -195,8 +196,8 @@ public class GridAdvisorDUnitTest extends JUnit4DistributedTestCase {
     vm2.invoke("Disconnect from " + locators, this::safeCloseCache);
     // now make sure controller saw all bridge servers stop
 
-    vm3.invoke(() -> verifyLocatorsAndBridgeServersStoppped());
-    vm3.invoke(() -> stopLocatorAndCheckIt());
+    vm3.invoke(this::verifyLocatorsAndBridgeServersStoppped);
+    vm3.invoke(this::stopLocatorAndCheckIt);
   }
 
 
@@ -300,15 +301,15 @@ public class GridAdvisorDUnitTest extends JUnit4DistributedTestCase {
       }
     });
 
-    vm0.invoke(() -> stopLocatorAndCheckIt());
+    vm0.invoke(this::stopLocatorAndCheckIt);
 
     // now make sure everyone else saw the locator go away
-    vm3.invoke(() -> verifyLocatorStopped());
-    vm2.invoke(() -> verifyBridgeServerSawLocatorStop(port2));
-    vm1.invoke(() -> verifyBridgeServerSawLocatorStopWithName(port2));
+    vm3.invoke(() -> await().untilAsserted(this::verifyLocatorStopped));
+    vm2.invoke(() -> await().untilAsserted(() -> verifyBridgeServerSawLocatorStop(port2)));
+    vm1.invoke(() -> await().untilAsserted(() -> verifyBridgeServerSawLocatorStopWithName(port2)));
 
     // restart bridge server 1 and see if controller sees it
-    vm1.invoke(() -> restartBridgeServer());
+    vm1.invoke(this::restartBridgeServer);
 
     vm3.invoke(() -> verifyBridgeServerRestart(bsPort1, bsPort2, bsPort3, bsPort4, "bs1Group1",
         "bs1Group2",
@@ -318,8 +319,8 @@ public class GridAdvisorDUnitTest extends JUnit4DistributedTestCase {
     vm2.invoke("Disconnect from " + locators, this::safeCloseCache);
     // now make sure controller saw all bridge servers stop
 
-    vm3.invoke(() -> verifyLocatorsAndBridgeServersStoppped());
-    vm3.invoke(() -> stopLocatorAndCheckIt());
+    vm3.invoke(() -> await().untilAsserted(this::verifyLocatorsAndBridgeServersStoppped));
+    vm3.invoke(this::stopLocatorAndCheckIt);
   }
 
   private void createCache(String locators, String groups) {