From d091665ab67471ab35674be54ac086741330f149 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Wed, 9 Jan 2019 14:40:43 -0500 Subject: [PATCH] Test fix --- .../jpa/subscription/SubscriptionInterceptorLoader.java | 9 ++++++--- .../src/test/java/ca/uhn/fhirtest/UhnFhirTestApp.java | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionInterceptorLoader.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionInterceptorLoader.java index 43677179b73..d3b68502b9a 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionInterceptorLoader.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/SubscriptionInterceptorLoader.java @@ -58,7 +58,13 @@ public class SubscriptionInterceptorLoader { } if (myDaoConfig.isSubscriptionMatchingEnabled()) { ourLog.info("Registering subscription matcher interceptor"); + + if (mySubscriptionMatcherInterceptor == null) { + mySubscriptionMatcherInterceptor = myAppicationContext.getBean(SubscriptionMatcherInterceptor.class); + } + myDaoConfig.registerInterceptor(mySubscriptionMatcherInterceptor); + } } @@ -72,9 +78,6 @@ public class SubscriptionInterceptorLoader { if (mySubscriptionActivatingInterceptor == null) { mySubscriptionActivatingInterceptor = myAppicationContext.getBean(SubscriptionActivatingInterceptor.class); } - if (mySubscriptionMatcherInterceptor == null) { - mySubscriptionMatcherInterceptor = myAppicationContext.getBean(SubscriptionMatcherInterceptor.class); - } } @VisibleForTesting diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/test/java/ca/uhn/fhirtest/UhnFhirTestApp.java b/hapi-fhir-jpaserver-uhnfhirtest/src/test/java/ca/uhn/fhirtest/UhnFhirTestApp.java index cbc346cc536..08be2db7a5c 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/test/java/ca/uhn/fhirtest/UhnFhirTestApp.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/test/java/ca/uhn/fhirtest/UhnFhirTestApp.java @@ -17,7 +17,7 @@ public class UhnFhirTestApp { public static void main(String[] args) throws Exception { - int myPort = 8888; + int myPort = 8889; String base = "http://localhost:" + myPort + "/baseDstu2"; // new File("target/testdb").mkdirs();