From a8c91ce6f5d1b6b53c64a8ace45c1b2f00416a19 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 15 Aug 2017 10:30:00 -0400 Subject: [PATCH] Try to get travis building again --- .../test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java | 5 +++++ .../src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java index f8d4802aee5..cdb356cea69 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java @@ -20,6 +20,8 @@ import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; import ca.uhn.fhir.validation.ResultSeverityEnum; import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; +import static org.junit.Assert.fail; + @Configuration @EnableTransactionManagement() public class TestDstu3Config extends BaseJavaConfigDstu3 { @@ -46,6 +48,9 @@ public class TestDstu3Config extends BaseJavaConfigDstu3 { } catch (Exception e) { ourLog.error("Exceeded maximum wait for connection", e); logGetConnectionStackTrace(); + if ("true".equals(System.getProperty("ci"))) { + fail("Exceeded maximum wait for connection: "+ e.toString()); + } System.exit(1); retVal = null; } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java index 3a3c6eed2e9..d296e849aee 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestR4Config.java @@ -20,6 +20,8 @@ import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor; import ca.uhn.fhir.validation.ResultSeverityEnum; import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder; +import static org.junit.Assert.fail; + @Configuration @EnableTransactionManagement() public class TestR4Config extends BaseJavaConfigR4 { @@ -46,6 +48,9 @@ public class TestR4Config extends BaseJavaConfigR4 { } catch (Exception e) { ourLog.error("Exceeded maximum wait for connection", e); logGetConnectionStackTrace(); + if ("true".equals(System.getProperty("ci"))) { + fail("Exceeded maximum wait for connection: " + e.toString()); + } System.exit(1); retVal = null; }