I am testing a service which heavily relies on project reactor.
many tests I am mocking the return value of the component responsible
for API calls. The tests are split over multiple files.
I run the tests of one file, they are green, but when I execute all of
the test files at once, some tests fail, with the error message
indicating that the mocking did not succeed (Either the injected
component returned `null`, or the implementation of the actual
component is invoked).
In the logs, there is no information about the mocking failing.
I attached a small code example.
Do you know what the reason is/might be for the tests failing?
me the issue seems like a race condition, but I don't know where and
how this might happen, and how I can check and fix this.