I'm using WireMock standalone App through docker. A few mocked endpoints are shared across many tests. When I run my tests sequentially, all work fine and pass. But when the tests are executed in parallel, the WireMock.veriyThat of some tests fails to find the requests to those shared endpoints. I believe it's due to multi-threading issue, some operations are not thread safe.
I checked the WireMock source code, internally it uses a store called RequestJournalStore to record received requests which will be matched in verifyThat. In its in-memory implementation, I can see it's using ConcurrentList which is supposed to be thread safe.
I'd appreciate it if anybody has solution of using WireMock in multi-thread environment, or gives suggestions of how to debug it effectively.