Try to prevent intermittent test failure
This commit is contained in:
parent
cbaa39fd63
commit
a5b1f684f7
|
@ -517,15 +517,19 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReindexing() {
|
public void testReindexing() throws InterruptedException {
|
||||||
Patient p = new Patient();
|
Patient p = new Patient();
|
||||||
p.addName().setFamily("family");
|
p.addName().setFamily("family");
|
||||||
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualified();
|
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualified();
|
||||||
|
|
||||||
|
sleepUntilTimeChanges();
|
||||||
|
|
||||||
ValueSet vs = new ValueSet();
|
ValueSet vs = new ValueSet();
|
||||||
vs.setUrl("http://foo");
|
vs.setUrl("http://foo");
|
||||||
myValueSetDao.create(vs, mySrd);
|
myValueSetDao.create(vs, mySrd);
|
||||||
|
|
||||||
|
sleepUntilTimeChanges();
|
||||||
|
|
||||||
ResourceTable entity = new TransactionTemplate(myTxManager).execute(t -> myEntityManager.find(ResourceTable.class, id.getIdPartAsLong()));
|
ResourceTable entity = new TransactionTemplate(myTxManager).execute(t -> myEntityManager.find(ResourceTable.class, id.getIdPartAsLong()));
|
||||||
assertEquals(Long.valueOf(1), entity.getIndexStatus());
|
assertEquals(Long.valueOf(1), entity.getIndexStatus());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue