Hey,
I am testing a service which heavily relies on project reactor.
For
many tests I am mocking the return value of the component responsible
for API calls. The tests are split over multiple files.
When
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?
For
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.
Best regards
Anton Oellerer