Try to prevent intermittent test failure

This commit is contained in:
James Agnew 2018-12-05 19:28:37 -05:00
parent cbaa39fd63
commit a5b1f684f7
1 changed files with 5 additions and 1 deletions

View File

@ -517,15 +517,19 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
}
@Test
public void testReindexing() {
public void testReindexing() throws InterruptedException {
Patient p = new Patient();
p.addName().setFamily("family");
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualified();
sleepUntilTimeChanges();
ValueSet vs = new ValueSet();
vs.setUrl("http://foo");
myValueSetDao.create(vs, mySrd);
sleepUntilTimeChanges();
ResourceTable entity = new TransactionTemplate(myTxManager).execute(t -> myEntityManager.find(ResourceTable.class, id.getIdPartAsLong()));
assertEquals(Long.valueOf(1), entity.getIndexStatus());