Added some extra logging to the ExampleServerR4IT test to see if I can debug what's going on when it runs on the CI Build Server.

This commit is contained in:
Kevin Dougan
2021-02-05 11:56:01 -05:00
parent 2f680c30b1
commit c0e95593bd

View File

@@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit;
import static ca.uhn.fhir.util.TestUtil.waitForSize;
import static java.util.Comparator.comparing;
import static org.awaitility.Awaitility.await;
import static org.hamcrest.Matchers.equalTo;
import static org.awaitility.Awaitility.pollInSameThread;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -49,8 +49,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
"spring.main.allow-bean-definition-overriding=true"
})
public class ExampleServerR4IT {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerR4IT.class);
private IGenericClient ourClient;
private FhirContext ourCtx;
@@ -61,8 +60,8 @@ public class ExampleServerR4IT {
@Test
@Order(0)
void testCreateAndRead() {
String methodName = "testCreateResourceConditional";
String methodName = "testCreateAndRead";
ourLog.info("Entering " + methodName + "()...");
Patient pt = new Patient();
pt.setActive(true);
@@ -77,8 +76,13 @@ public class ExampleServerR4IT {
// Test MDM
List<Patient> patients = getPatients();
ourLog.info(((patients == null)?"0":patients.size()) + " Patients found...");
for (Patient p : patients) {
ourLog.info("Patient: " + p.getId() + " : " + p.toString());
}
// Wait until the MDM message has been processed
await().until(() -> getPatients().size(), equalTo(2));
//await().until(() -> getPatients().size(), equalTo(2));
List<Patient> persons = getPatients();
Patient goldenRecord = persons.get(0);