Use forWaiting() in AnnouncerTest

* Helps reduce random failures in unit test on slow systems
This commit is contained in:
Charles Allen 2015-02-24 08:35:07 -08:00
parent 9b94f725fe
commit 29a3522708
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ public class AnnouncerTest extends CuratorTestBase
}
);
curator.delete().forPath(testPath1);
Assert.assertTrue("Wait for /test1 to be created", timing.awaitLatch(latch));
Assert.assertTrue("Wait for /test1 to be created", timing.forWaiting().awaitLatch(latch));
Assert.assertArrayEquals("expect /test1 data is restored", billy, curator.getData().decompressed().forPath(testPath1));
Assert.assertArrayEquals("expect /somewhere/test2 is still there", billy, curator.getData().decompressed().forPath(testPath2));