-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
Hi folks!
I'm raising this here although it may be related to the Mock Server. We're having issues when updating to the latest version of the Mock Server and its Java client (5.11.0) with Testcontainers.
The Problem
We use Testcontainer's MockServerContainer which starts the jamesdbloom/mockserver container, something like:
@Container
static MockServerContainer mockServerContainer = new MockServerContainer("5.11.0"));
The container doesn't seem to start and the build/tests time out waiting for it:
2020-07-09T17:16:36.590+0100 ERROR [main] ?.11.0] - Could not start container org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open (localhost ports: [33023] should be listening)
This is working fine in 5.10.0.
Potential Solution
The bit that seems to cause the issue is the addExposedPorts call in the MockServerContainer. I created a custom class with the same logic but without it and solves the problem.
I've also tested it in 5.10.0 and works fine. Is this a reasonable workaround and is there any reason why this call was/is needed?
Thanks :)
Reactions are currently unavailable