Fix intermittent test failure

This commit is contained in:
James Agnew 2019-07-19 10:46:49 -04:00
parent 6ff8484914
commit 458cfcfa12
1 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory;
import java.util.List;
import static org.awaitility.Awaitility.await;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.*;
@ -344,6 +345,7 @@ public class ExpungeR4Test extends BaseResourceProviderR4Test {
assertEquals(2, search.getResources(0, 2).size());
runInTransaction(() -> {
await().until(()->mySearchResultDao.count() == 2);
ourLog.info("Search results: {}", mySearchResultDao.findAll().toString());
assertEquals(mySearchResultDao.findAll().toString(), 2, mySearchResultDao.count());
});