I just try to upgrade my project from 1.6.0 to 1.7 and 1.8 but this is failing my tests. And I'm not sure why.
Here is my branch: https://github.com/dadoonet/testcontainers-java-module-elasticsearch/tree/pr/tc-1.8.0 and the associated PR dadoonet/testcontainers-java-module-elasticsearch#34
When changing this line: https://github.com/dadoonet/testcontainers-java-module-elasticsearch/blob/pr/tc-1.8.0/pom.xml#L21 from
<testcontainer.version>1.6.0</testcontainer.version>
to
<testcontainer.version>1.7.3</testcontainer.version>
or
<testcontainer.version>1.8.0</testcontainer.version>
And then run mvn clean install, I'm getting some errors in tests:
fr.pilato.elasticsearch.containers.ElasticsearchResourceWithPluginsTest Time elapsed: 28.462 sec <<< ERROR!
org.testcontainers.containers.ContainerLaunchException: Container startup failed
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:214)
at fr.pilato.elasticsearch.containers.ElasticsearchResource.before(ElasticsearchResource.java:166)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: org.testcontainers.images.builder.ImageFromDockerfile@53667cbe
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:841)
at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:311)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:203)
... 16 more
Caused by: com.github.dockerjava.api.exception.DockerClientException: Could not build image
at com.github.dockerjava.core.command.BuildImageResultCallback.getImageId(BuildImageResultCallback.java:76)
at com.github.dockerjava.core.command.BuildImageResultCallback.awaitImageId(BuildImageResultCallback.java:51)
at org.testcontainers.images.builder.ImageFromDockerfile.resolve(ImageFromDockerfile.java:141)
at org.testcontainers.images.builder.ImageFromDockerfile.resolve(ImageFromDockerfile.java:30)
at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:20)
at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:27)
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:839)
... 18 more
Reverting to 1.6.0 and all tests are OK again.
Also another side effect is about logger. I might be missing some pieces as I'm now having:
log4j:WARN No appenders could be found for logger (org.apache.http.impl.nio.client.MainClientExec).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
I tried various things like adding log4j 1 lib as one of first dependencies with no luck.
I just try to upgrade my project from 1.6.0 to 1.7 and 1.8 but this is failing my tests. And I'm not sure why.
Here is my branch: https://github.com/dadoonet/testcontainers-java-module-elasticsearch/tree/pr/tc-1.8.0 and the associated PR dadoonet/testcontainers-java-module-elasticsearch#34
When changing this line: https://github.com/dadoonet/testcontainers-java-module-elasticsearch/blob/pr/tc-1.8.0/pom.xml#L21 from
to
or
And then run
mvn clean install, I'm getting some errors in tests:Reverting to 1.6.0 and all tests are OK again.
Also another side effect is about logger. I might be missing some pieces as I'm now having:
I tried various things like adding log4j 1 lib as one of first dependencies with no luck.