Java WireMock defining stubs fail in multithreaded tests with Cucumber parallel execution
I have Spring-Boot application and integration tests using Cucumber and WireMock.
Executing tests in regular non parallel execution mode works fine without any issues, but when switched to parallel with cucumber.execution.parallel.enabled as true, it started to fail. Exception:
com.github.tomakehurst.wiremock.common.JsonException:
{
"errors" : [ {
"code" : 10,
"source" : {
"pointer" : "/code"
},
"title" : "Error parsing JSON",
"detail" : "Unrecognized field...