This is an automated email from the ASF dual-hosted git repository.
heybales pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new ea5c500 GEODE-5712: Increase Awaitility timeout (#2447)
ea5c500 is described below
commit ea5c500389d54153971526898cada35b5b2e0354
Author: Helena Bales <[email protected]>
AuthorDate: Wed Sep 12 09:56:11 2018 -0700
GEODE-5712: Increase Awaitility timeout (#2447)
* GEODE-5712: increase awaitility timeout
The awaitility timed out after only 1 second, so there was no time to
evaluate the assertion. Awaitility throws a timeout exception once the
duration given in atMost() is reached.
Signed-off-by: Dale Emery<[email protected]>
---
.../geode/distributed/GrantorFailoverDUnitTest.java | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git
a/geode-core/src/distributedTest/java/org/apache/geode/distributed/GrantorFailoverDUnitTest.java
b/geode-core/src/distributedTest/java/org/apache/geode/distributed/GrantorFailoverDUnitTest.java
index faa16e0..d971689 100644
---
a/geode-core/src/distributedTest/java/org/apache/geode/distributed/GrantorFailoverDUnitTest.java
+++
b/geode-core/src/distributedTest/java/org/apache/geode/distributed/GrantorFailoverDUnitTest.java
@@ -49,6 +49,12 @@ public class GrantorFailoverDUnitTest {
locators.add(clusterStartupRule.startLocatorVM(0));
locators.add(clusterStartupRule.startLocatorVM(1,
locators.get(0).getPort()));
locators.add(clusterStartupRule.startLocatorVM(2,
locators.get(0).getPort()));
+
+
+ for (MemberVM locator : locators) {
+ locator.invoke((SerializableRunnableIF) () ->
DistributedLockService.create(SERVICE_NAME,
+ ClusterStartupRule.getCache().getDistributedSystem()));
+ }
}
@After
@@ -65,11 +71,6 @@ public class GrantorFailoverDUnitTest {
final AtomicBoolean lock0Status = new AtomicBoolean(false);
final AtomicBoolean lock1Status = new AtomicBoolean(false);
- for (MemberVM locator : locators) {
- locator.invoke((SerializableRunnableIF) () ->
DistributedLockService.create(SERVICE_NAME,
- ClusterStartupRule.getCache().getDistributedSystem()));
- }
-
lock0Status.set(locators.get(0)
.invoke(() ->
DistributedLockService.getServiceNamed(SERVICE_NAME).lock(lock0, 20, -1)));
lock1Status.set(locators.get(1)
@@ -109,11 +110,6 @@ public class GrantorFailoverDUnitTest {
locators.get(0).invoke(GrantorFailoverDUnitTest::assertIsElderAndGetId);
- for (MemberVM locator : locators) {
- locator.invoke((SerializableRunnableIF) () ->
DistributedLockService.create(SERVICE_NAME,
- ClusterStartupRule.getCache().getDistributedSystem()));
- }
-
// Grantor but not the elder
final MemberVM grantorVM = locators.get(1);
final MemberVM survivor1 = locators.get(0);
@@ -180,7 +176,7 @@ public class GrantorFailoverDUnitTest {
private static InternalDistributedMember assertIsElderAndGetId() {
DistributionManager distributionManager =
ClusterStartupRule.getCache().getInternalDistributedSystem().getDistributionManager();
- Awaitility.await("Wait to be elder").atMost(1, TimeUnit.SECONDS)
+ Awaitility.await("Wait to be elder").atMost(2, TimeUnit.MINUTES)
.untilAsserted(() ->
assertThat(distributionManager.isElder()).isTrue());
return distributionManager.getElderId();
}