-
Testcontainers Java 1.17.6 I've run into an issue with starting a custom docker image as a testcontainer when running on the build server (locally on Linux it works). Oddly, we use a PostgreSQL testcontainer in this particular test without issue. Further the custom image itself is verified itself via java testcontainers in its own build. I've enabled debug logging for
Is there additional logging I could turn on, or would anyone have suggestions as to what to look at? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
For logs, have you check https://www.testcontainers.org/supported_docker_environment/logging_config/ ? |
Beta Was this translation helpful? Give feedback.
-
I eventually tracked this down. Locally testcontainers is able to use one of the hardcoded docker strategies. However on Jenkins these strategies don't work and in my OSGi environment the Thread's context class loader is set to a PaxExam To solve this we do something like this:
Not really clear to me what motivates the usage of the Thread's context classloader here. It would also be helpful if the stacktraces were logged rather than swallowed. |
Beta Was this translation helpful? Give feedback.
I eventually tracked this down.
Locally testcontainers is able to use one of the hardcoded docker strategies. However on Jenkins these strategies don't work and in my OSGi environment the Thread's context class loader is set to a PaxExam
ClassLoader
. ThisClassLoader
does not have access to the classes in TestContainers, so all of the dynamic strategies fail.To solve this we do something like this:
Not really clear…