hapi-fhir-jpaserver-starter icon indicating copy to clipboard operation
hapi-fhir-jpaserver-starter copied to clipboard

"mvn install" is failed due to running ElasticsearchLastNR4IT test error

Open kiwisky opened this issue 3 years ago • 3 comments

kiwisky avatar Apr 27 '22 06:04 kiwisky

I got following error when I am running "mvn install" [INFO] Running ca.uhn.fhir.jpa.starter.ElasticsearchLastNR4IT [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.045 s <<< FAILURE! - in ca.uhn.fhir.jpa.starter.ElasticsearchLastNR4IT [ERROR] ca.uhn.fhir.jpa.starter.ElasticsearchLastNR4IT Time elapsed: 7.045 s <<< ERROR!

It seems the test requires Docker ENV, but my server has no Docker because I am going to deploy it to a Tomcat application server. If I run "mvn install -DskipTests", it is successful. But I think it should not require Docker ENV? Thanks!

kiwisky avatar Apr 27 '22 06:04 kiwisky

@kiwisky those tests actually require docker as test containers (https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/fdfa6fd711f411c58b9175223c05141cea0598fe/src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java#L63) are used to spin up an elasticsearch instance

jkiddo avatar May 01 '22 19:05 jkiddo

We have a test annotation in Hapi -- @RequiresDocker . If you add that to this test, it will be skipped when docker isn't present. All tests that use docker should include @RequiresDocker. See the JUnit DockerRequiredCondition .

michaelabuckley avatar May 02 '22 21:05 michaelabuckley

This issue is stale because it has been open 730 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar May 02 '24 02:05 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar May 07 '24 02:05 github-actions[bot]