Fix pointcutlatch issue
This commit is contained in:
parent
bd22b0239f
commit
4d3cecaab2
|
@ -86,7 +86,6 @@ public class EmpiConsumerConfig {
|
||||||
return new EmpiMatchLinkSvc();
|
return new EmpiMatchLinkSvc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
EmpiEidUpdateService eidUpdateService() {
|
EmpiEidUpdateService eidUpdateService() {
|
||||||
return new EmpiEidUpdateService();
|
return new EmpiEidUpdateService();
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class EmpiProviderBatchR4Test extends BaseLinkR4Test {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBatchRunOnAllPractitioners() {
|
public void testBatchRunOnAllPractitioners() throws InterruptedException {
|
||||||
StringType criteria = null;
|
StringType criteria = null;
|
||||||
myEmpiProviderR4.clearEmpiLinks(null);
|
myEmpiProviderR4.clearEmpiLinks(null);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public class EmpiProviderBatchR4Test extends BaseLinkR4Test {
|
||||||
assertLinkCount(1);
|
assertLinkCount(1);
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testBatchRunOnSpecificPractitioner() {
|
public void testBatchRunOnSpecificPractitioner() throws InterruptedException {
|
||||||
myEmpiProviderR4.clearEmpiLinks(null);
|
myEmpiProviderR4.clearEmpiLinks(null);
|
||||||
afterEmpiLatch.runWithExpectedCount(1, () -> myEmpiProviderR4.empiBatchPractitionerInstance(myPractitioner.getIdElement(), null));
|
afterEmpiLatch.runWithExpectedCount(1, () -> myEmpiProviderR4.empiBatchPractitionerInstance(myPractitioner.getIdElement(), null));
|
||||||
assertLinkCount(1);
|
assertLinkCount(1);
|
||||||
|
@ -74,7 +74,7 @@ public class EmpiProviderBatchR4Test extends BaseLinkR4Test {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBatchRunOnAllPatients() {
|
public void testBatchRunOnAllPatients() throws InterruptedException {
|
||||||
assertLinkCount(2);
|
assertLinkCount(2);
|
||||||
StringType criteria = null;
|
StringType criteria = null;
|
||||||
myEmpiProviderR4.clearEmpiLinks(null);
|
myEmpiProviderR4.clearEmpiLinks(null);
|
||||||
|
@ -83,7 +83,7 @@ public class EmpiProviderBatchR4Test extends BaseLinkR4Test {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBatchRunOnSpecificPatient() {
|
public void testBatchRunOnSpecificPatient() throws InterruptedException {
|
||||||
assertLinkCount(2);
|
assertLinkCount(2);
|
||||||
myEmpiProviderR4.clearEmpiLinks(null);
|
myEmpiProviderR4.clearEmpiLinks(null);
|
||||||
afterEmpiLatch.runWithExpectedCount(1, () -> myEmpiProviderR4.empiBatchPatientInstance(myPatient.getIdElement(), null));
|
afterEmpiLatch.runWithExpectedCount(1, () -> myEmpiProviderR4.empiBatchPatientInstance(myPatient.getIdElement(), null));
|
||||||
|
@ -101,7 +101,7 @@ public class EmpiProviderBatchR4Test extends BaseLinkR4Test {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBatchRunOnAllTypes() {
|
public void testBatchRunOnAllTypes() throws InterruptedException {
|
||||||
assertLinkCount(2);
|
assertLinkCount(2);
|
||||||
StringType criteria = new StringType("");
|
StringType criteria = new StringType("");
|
||||||
myEmpiProviderR4.clearEmpiLinks(null);
|
myEmpiProviderR4.clearEmpiLinks(null);
|
||||||
|
|
|
@ -67,15 +67,10 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch {
|
||||||
myPointcut = null;
|
myPointcut = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void runWithExpectedCount(int theExpectedCount, Runnable r) {
|
public void runWithExpectedCount(int theExpectedCount, Runnable r) throws InterruptedException {
|
||||||
this.setExpectedCount(theExpectedCount);
|
this.setExpectedCount(theExpectedCount);
|
||||||
r.run();
|
r.run();
|
||||||
try {
|
this.awaitExpected();
|
||||||
this.awaitExpected();
|
|
||||||
} catch (InterruptedException theE) {
|
|
||||||
ourLog.error("InterruptedException while awaiting invocation of {}", this.myPointcut.name());
|
|
||||||
theE.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getLastInvoke() {
|
public long getLastInvoke() {
|
||||||
|
|
Loading…
Reference in New Issue