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

mcmellawatt 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 bfc0449  GEODE-6277: use await() instead of hard-coded sleep(3000) in 
the test (#3086)
bfc0449 is described below

commit bfc0449e81b7ac5429f7473b216762c22c10f95b
Author: Xiaojian Zhou <gesterz...@users.noreply.github.com>
AuthorDate: Wed Feb 6 17:14:34 2019 -0800

    GEODE-6277: use await() instead of hard-coded sleep(3000) in the test 
(#3086)
---
 .../java/org/apache/geode/cache30/MultiVMRegionTestCase.java   | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git 
a/geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java 
b/geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
index de400e0..ff4747c 100644
--- 
a/geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
+++ 
b/geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java
@@ -4971,13 +4971,9 @@ public abstract class MultiVMRegionTestCase extends 
RegionTestCase {
               // reset slow
               
org.apache.geode.internal.cache.InitialImageOperation.slowImageProcessing = 0;
               // if global scope, the region doesn't get destroyed until after 
region creation
-              try {
-                Thread.sleep(3000);
-              } catch (InterruptedException ie) {
-                fail("interrupted");
-              }
-              assertThat(getRootRegion().getSubregion(name) == null
-                  || getRegionAttributes().getScope().isGlobal()).isTrue();
+              await().until(
+                  () -> getRootRegion().getSubregion(name) == null || 
getRegionAttributes()
+                      .getScope().isGlobal());
             }
           });
       if (getRegionAttributes().getScope().isGlobal()) {

Reply via email to