Fix testSupplierExpirationReloadsTheCache sometimes failing

This commit is contained in:
Zack Shoylev 2016-02-17 14:08:37 -06:00
parent 2638ba4e69
commit 5e3924947a
1 changed files with 2 additions and 2 deletions

View File

@ -141,9 +141,9 @@ public class ImageCacheSupplierTest {
assertEquals(image.get().getName(), "imageName-foo");
assertEquals(imageCache.get().size(), 2);
// Once the supplier expires, reloading it will laod the initial values
// Once the supplier expires, reloading it will load the initial values
// (it is a hardcoded supplier), so the just loaded image should be gone
Uninterruptibles.sleepUninterruptibly(3, TimeUnit.SECONDS);
Uninterruptibles.sleepUninterruptibly(4, TimeUnit.SECONDS);
assertEquals(imageCache.get().size(), 1);
assertFalse(any(imageCache.get(), idEquals("foo")));
}