wiremock.client.VerificationException: Expected status 2xx for http://localhost:6789/__admin/mappings but was 500
See original GitHub issueIssue guidelines
My espresso tests are all failing with the above, after introducing coreLibraryDesugaringEnabled true
(Java 8 API support on lower Android API levels) that comes with the Android Google Plugin 4.0
Bug reports
- Which version of WireMock you’re using -
androidTestImplementation "com.github.tomakehurst:wiremock-standalone:2.26.3"
- How you’re starting and configuring WireMock, including configuration or CLI the command line
@Rule
@JvmField
val wireMockRule = WireMockRule(wireMockConfig().port(6789), false)
wireMockRule.start()
WireMock.stubFor(WireMock.any(WireMock.urlMatching("/$endPoint"))
.willReturn(responseManager.getResponse(mockResponseKey)))
- Stacktrace
com.github.tomakehurst.wiremock.client.VerificationException: Expected status 2xx for http://localhost:6789/__admin/mappings but was 500
at com.github.tomakehurst.wiremock.client.HttpAdminClient.safelyExecuteRequest(HttpAdminClient.java:476)
at com.github.tomakehurst.wiremock.client.HttpAdminClient.executeRequest(HttpAdminClient.java:454)
at com.github.tomakehurst.wiremock.client.HttpAdminClient.addStubMapping(HttpAdminClient.java:131)
at com.github.tomakehurst.wiremock.client.WireMock.register(WireMock.java:298)
at com.github.tomakehurst.wiremock.client.WireMock.register(WireMock.java:293)
at com.github.tomakehurst.wiremock.client.WireMock.givenThat(WireMock.java:104)
at com.github.tomakehurst.wiremock.client.WireMock.stubFor(WireMock.java:108)
-
A failing test case that demonstrates the problem -
Profiler data if the issue is performance related
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Top Results From Across the Web
wiremock.client.VerificationException: Expected status 2xx for ...
client.VerificationException: Expected status 2xx for http://localhost:6789/__admin/mappings but was 500 #1323.
Read more >com.github.tomakehurst.wiremock.client.VerificationException
For this example, I suppose the wiremock was started externally,right? So you should add the configure for with the host and the port:...
Read more >WireMock stub creation fails: expects 201 but gets 200
VerificationException : Expected status 201 for http://localhost:9089/__admin/mappings/new but was 200 at com.github.tomakehurst.wiremock.client.
Read more >Verifying whether specific HTTP requests were made | WireMock
Verifying and querying requests relies on the request journal, which is an in-memory log of received requests. This can be disabled for load...
Read more >WireMock Tutorial: Introduction to Stubbing - Petri Kainulainen
import static com.github.tomakehurst.wiremock.client. ... to ensure that our WireMock server returns the HTTP status code 500 and the status ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK, thanks for letting me know. I’m not an Android dev, so this is useful knowledge.
I’ll keep this issue open for the time being, but I’m going to wait and see what the Jackson folks say about the issue you’ve opened with them.
Closing, as I don’t think there’s anything more we can do here until the desugaring issue is resolved.