[JAMES-3696] improves flaky tests from ManageableMailQueueContract

The pulsar implementation uses a distributed and therefore asynchronous distribution of the removal filters.

This change ensures that the tests allow for such an implementation by waiting for the system under test to converge to the desired state.

It also ensures that the executor waits as little as possible to get into a consistent state, ensuring fast local execution while allowing a longer wait on the CI. If the default timeout (10s if I understand correctly) is not enough for the CI, it can be safely increased without slowing down local test execution like Thread.sleep() did.
3 files changed