mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
Fix test ebean-redis ClusterTest such that it allows for background thread sync to redis
This commit is contained in:
1 parent
dcd3bfee4c
commit
c8bb3c7b57
1 file changed
+2
-1
@@ -27,7 +27,7 @@ public class ClusterTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBothNear() {
|
public void testBothNear() throws InterruptedException {
|
||||||
// ensure the default server exists first
|
// ensure the default server exists first
|
||||||
final Database db = DB.getDefault();
|
final Database db = DB.getDefault();
|
||||||
Database other = createOther(db.pluginApi().dataSource());
|
Database other = createOther(db.pluginApi().dataSource());
|
||||||
@@ -44,6 +44,7 @@ public class ClusterTest {
|
|||||||
other.metaInfo().resetAllMetrics();
|
other.metaInfo().resetAllMetrics();
|
||||||
|
|
||||||
Person fooA = DB.find(Person.class, foo.getId());
|
Person fooA = DB.find(Person.class, foo.getId());
|
||||||
|
allowAsyncMessaging(); // allow time for background cache load
|
||||||
Person fooB = other.find(Person.class, foo.getId());
|
Person fooB = other.find(Person.class, foo.getId());
|
||||||
|
|
||||||
DuelCache dualCacheA = (DuelCache) DB.cacheManager().beanCache(Person.class);
|
DuelCache dualCacheA = (DuelCache) DB.cacheManager().beanCache(Person.class);
|
||||||
|
|||||||
Reference in new issue
Block a user