Fix intermittent
This commit is contained in:
parent
75ad205bd5
commit
d321a8276a
|
@ -11,8 +11,8 @@ public class CountingInterceptor implements ChannelInterceptor {
|
|||
|
||||
private List<String> mySent = new ArrayList<>();
|
||||
|
||||
public int getSentCount() {
|
||||
return mySent.size();
|
||||
public int getSentCount(String theContainingKeyword) {
|
||||
return (int)mySent.stream().filter(t -> t.contains(theContainingKeyword)).count();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -305,9 +305,9 @@ public class RestHookTestR4Test extends BaseSubscriptionsR4Test {
|
|||
.addExtension(JpaConstants.EXT_SUBSCRIPTION_RESTHOOK_STRIP_VERSION_IDS, new BooleanType("true"));
|
||||
ourLog.info("** About to update subscription");
|
||||
|
||||
int modCount = myCountingInterceptor.getSentCount();
|
||||
int modCount = (int) myCountingInterceptor.getSentCount("Observation");
|
||||
ourClient.update().resource(subscription1).execute();
|
||||
waitForSize(modCount + 1, () -> myCountingInterceptor.getSentCount(), () -> myCountingInterceptor.toString());
|
||||
waitForSize(modCount + 1, () -> myCountingInterceptor.getSentCount("Observation"), () -> myCountingInterceptor.toString());
|
||||
|
||||
ourLog.info("** About to send observation");
|
||||
Observation observation2 = sendObservation(code, "SNOMED-CT");
|
||||
|
|
|
@ -303,9 +303,9 @@ public class RestHookTestR5Test extends BaseSubscriptionsR5Test {
|
|||
.addExtension(JpaConstants.EXT_SUBSCRIPTION_RESTHOOK_STRIP_VERSION_IDS, new BooleanType("true"));
|
||||
ourLog.info("** About to update subscription");
|
||||
|
||||
int modCount = myCountingInterceptor.getSentCount();
|
||||
int modCount = myCountingInterceptor.getSentCount("Observation");
|
||||
ourClient.update().resource(subscription1).execute();
|
||||
waitForSize(modCount + 1, () -> myCountingInterceptor.getSentCount(), () -> myCountingInterceptor.toString());
|
||||
waitForSize(modCount + 1, () -> myCountingInterceptor.getSentCount("Observation"), () -> myCountingInterceptor.toString());
|
||||
|
||||
ourLog.info("** About to send observation");
|
||||
Observation observation2 = sendObservation(code, "SNOMED-CT");
|
||||
|
|
Loading…
Reference in New Issue