This message was deleted.
# wiremock-java
s
This message was deleted.
o
Hello. Could you please try with the
3.1.0-1
Docker image? You also override the
waitingFor
method, and hence the embedded health check does not get tried. I would assume the container fails to start though
a
I did try Docker image
3.1.0-1
and removed
waitingFor
override. Result failed just like it did before so I enabled container logging (preceded with WIREMOCK) and I can see that the container started successfully and received the request to list all mappings:
Copy code
2023-09-22T06:50:17.792Z  INFO 368 --- [    Test worker] o.t.c.wait.strategy.HttpWaitStrategy     : /eager_kowalevski: Waiting for 60 seconds for URL: <http://172.17.0.1:32769/__admin/mappings> (where port 32769 maps to container port 8080)
2023-09-22T06:50:18.136Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 2023-09-22 06:50:18.131 Verbose logging enabled
2023-09-22T06:50:18.677Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 2023-09-22 06:50:18.677 Verbose logging enabled
2023-09-22T06:50:19.000Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 
2023-09-22T06:50:19.001Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: The WireMock server is started .....
2023-09-22T06:50:19.003Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: port:                         8080
2023-09-22T06:50:19.004Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: enable-browser-proxying:      false
2023-09-22T06:50:19.005Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: disable-banner:               true
2023-09-22T06:50:19.006Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: no-request-journal:           false
2023-09-22T06:50:19.006Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: verbose:                      true
2023-09-22T06:50:19.008Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 
2023-09-22T06:50:19.927Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 2023-09-22 06:50:19.925 Admin request received:
2023-09-22T06:50:19.928Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 172.17.0.1 - GET /mappings
2023-09-22T06:50:19.929Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 
2023-09-22T06:50:19.930Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: User-Agent: [Java/17.0.8.1]
2023-09-22T06:50:19.930Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: Host: [172.17.0.1:32769]
2023-09-22T06:50:19.931Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: Accept: [text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2]
2023-09-22T06:50:19.931Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: Connection: [keep-alive]
2023-09-22T06:50:19.932Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 
2023-09-22T06:50:19.932Z  INFO 368 --- [eam--1949476450] .BaseServiceIntegrationTest : WIREMOCK: 
2023-09-22T06:50:20.038Z  INFO 368 --- [    Test worker] tc.wiremock/wiremock:3.1.0-1             : Container wiremock/wiremock:3.1.0-1 started in PT12.37483945S
2023-09-22T06:50:20.040Z DEBUG 368 --- [    Test worker] .BaseServiceIntegrationTest : WireMock container baseUrl: '<http://172.17.0.1:32769>'
2023-09-22T06:50:20.583Z ERROR 368 --- [    Test worker] o.s.boot.SpringApplication               : Application run failed

    org.apache.hc.client5.http.HttpHostConnectException: Connect to <http://localhost:32769> [localhost/127.0.0.1] failed: Connection refused
Problem fixed. I needed to point HttpAdminClient to the bridging IP and not "localhost" when running Docker-in-Docker.
🙌 1
o
Good to know, thanks