Fix test ebean-redis ClusterTest such that it allows for background thread sync to redis

This commit is contained in:
Rob Bygrave
2022-03-28 09:23:55 +13:00
parent dcd3bfee4c
commit c8bb3c7b57
@@ -27,7 +27,7 @@ public class ClusterTest {
}
@Test
public void testBothNear() {
public void testBothNear() throws InterruptedException {
// ensure the default server exists first
final Database db = DB.getDefault();
Database other = createOther(db.pluginApi().dataSource());
@@ -44,6 +44,7 @@ public class ClusterTest {
other.metaInfo().resetAllMetrics();
Person fooA = DB.find(Person.class, foo.getId());
allowAsyncMessaging(); // allow time for background cache load
Person fooB = other.find(Person.class, foo.getId());
DuelCache dualCacheA = (DuelCache) DB.cacheManager().beanCache(Person.class);