Federico Silveri
03/05/2024, 12:11 PMJava
that stopped working after upgrading the version from 3.0.4
to 3.4.2
issue:
My test is failing because I have a timeout set to 3" and my API are not receiving any response from WireMock within that timeframe.
This is how I configured the WireMockServer instance:
final WireMockConfiguration options = new WireMockConfiguration().dynamicPort();
this.wireMockServer = new WireMockServer(options);
this.wireMockServer.start();
And here is my stub:
this.wireMockServer.stubFor(get(new UrlPathPattern(containing(**URL**), true))
.inScenario("test scenario")
.whenScenarioStateIs(STARTED)
.willSetStateTo("test scenario 1")
.withHeader(AUTHORIZATION, equalTo("Bearer " + token))
.willReturn(aResponse()
.withBody(mapper.serialize(response).orElseThrow())
.withHeader(CONTENT_TYPE, APPLICATION_JSON)));
I tried to progressively upgrade the version from 3.0.4
and I'm starting to see the issue from 3.3.1
(same issue with 3.3.0
but I'm not using it since it's been marked as discarded). I tried to look at the release note but I couldn't find anything to the issue I'm having.
I would really appreciate anyones help 🙏 🙂Tom
03/05/2024, 3:18 PMFederico Silveri
03/05/2024, 3:27 PMTom
03/05/2024, 3:29 PMFederico Silveri
03/05/2024, 3:57 PMFederico Silveri
03/05/2024, 3:58 PMVerbose logging enabled
Federico Silveri
03/05/2024, 3:59 PMTom
03/05/2024, 4:01 PMFederico Silveri
03/05/2024, 4:03 PM__admin/mappings
endpoint via Postman, but I get Error: socket hang up
in return.Tom
03/05/2024, 4:04 PMTom
03/05/2024, 4:04 PMFederico Silveri
03/05/2024, 4:04 PMTom
03/05/2024, 4:04 PMFederico Silveri
03/05/2024, 4:04 PMAre you using http or https?http
Tom
03/05/2024, 4:05 PMFederico Silveri
03/05/2024, 4:05 PMTom
03/05/2024, 4:05 PMTom
03/05/2024, 4:06 PMTom
03/05/2024, 4:06 PMFederico Silveri
03/05/2024, 4:41 PMWondering whether there’s been a transitive dependencyThat was the issue, the
http2-server
version was set to a previous (11.0.16) one that perhaps was preventing the wiremock server to startup properly.Federico Silveri
03/05/2024, 4:42 PM