You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/03/10 08:48:40 UTC
[camel] branch main updated: camel-fhir - testing troubles
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new fd83788 camel-fhir - testing troubles
fd83788 is described below
commit fd8378885c4c496ba7ac47c3a07d34b5e3ad30ee
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 10 09:05:09 2022 +0100
camel-fhir - testing troubles
---
.../apache/camel/component/fhir/AbstractFhirTestSupport.java | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
index a981acd..73400a8 100644
--- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
+++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
@@ -32,6 +32,7 @@ import org.hl7.fhir.dstu3.model.HumanName;
import org.hl7.fhir.dstu3.model.Patient;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.extension.RegisterExtension;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -42,19 +43,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public abstract class AbstractFhirTestSupport extends CamelTestSupport {
- static FhirService service;
+ @RegisterExtension
+ public static FhirService service = FhirServiceFactory.createService();
protected Patient patient;
FhirContext fhirContext;
IGenericClient fhirClient;
- static {
- // We don't want a new FHIR server for every test class
- // https://www.testcontainers.org/test_framework_integration/manual_lifecycle_control/
- service = FhirServiceFactory.createService();
- service.initialize();
- }
-
@BeforeEach
public void cleanFhirServerState() {
if (patientExists()) {