Closed copsafe closed 1 year ago
When the RestTempate
instance is bound to MockRestServiceServer
, it needs to be configured with mock responses for all expected requests, or otherwise there is no way to know otherwise what response to send. Note that we recently added a feature in #29721 that allows some requests to be executed by actually making an HTTP call rather than returning a mock response. In case that was your expectation.
In any case, this is expected behavior, so I'm closing the issue, but feel free to comment further.
Affects: 5.3.18
MockRestServiceServer.verify() did not work with single API testing if project has more than one API.
Example:
If the schedule1 executes first, then the testSchedule2 fails and vice versa.
The Map requestFailures in AbstractRequestExpectationManager seems stores all executed APIs even it is not expected.