I am seeing the following issue while running inside a container via our Jenkinsfile
Our Jenkinsfiles looks something like
stage 'Entering Build Container'
docker.image('repo.jfrog.io/jenkins-docker').inside() {
sshagent(['jenkins_github']){
stage 'Run Test'
sh ' gradle test'
}
mytestIT > classMethod FAILED
java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalStateException at mytestIT.java:53
37 tests completed, 1 failed
:test FAILED
At that line in my test I have the following
@ClassRule
public static GenericContainer es =
new GenericContainer("elk:latest")
.withExposedPorts(9200,5601,9300,5044)
.waitingFor(Wait.forListeningPort());
This test runs fine locally.