reactor / reactor-core

Non-Blocking Reactive Foundation for the JVM
http://projectreactor.io
Apache License 2.0
4.99k stars 1.21k forks source link

Fix MonoPublishOnTest flakiness #3898

Closed chemicL closed 1 month ago

chemicL commented 1 month ago

The implementation relied on a specific sequencing of events, which in case of slower hardware or random events would occasionally fail the assertions. This change introduces firm ordering and fixes an incorrect assertion, which assumed the Mono terminates without error, while in fact the RejectedExecutionException is propagated to the AssertSubscriber. In effect, the tests are no longer flaky.

chemicL commented 1 month ago

except some formatting issues, it is ok

Thanks. I think I addressed all of them now.