Fix some tests race conditions

* Fix unused import in the `IntegrationRequestMappingHandlerMapping`
* Fix deprecations from Reactor
* Fix race condition in the `AbstractCorrelatingMessageHandlerTests`:
 the discard message is sent much earlier than group is removed from the store.
Iterate group count call until it pass or 10 seconds timeout
* Remove list size assert in the `FtpServerOutboundTests`: looks like
it is not updated properly even if we have an expected content in the collection
* Increase timeout to assert remote files removal in the `FtpRemoteFileTemplateTests`
This commit is contained in:
Artem Bilan
2020-09-12 11:58:57 -04:00
parent c36314d6ec
commit 5bac9bf66e
7 changed files with 8 additions and 8 deletions

View File

@@ -715,7 +715,6 @@ public class FtpServerOutboundTests extends FtpTestSupport {
});
resetSessionCache();
assertThat(this.config.latch.await(10, TimeUnit.SECONDS)).isTrue();
assertThat(this.config.events).hasSize(11);
assertThat(this.config.events.get(0)).isInstanceOf(SessionOpenedEvent.class);
assertThat(this.config.events.get(1)).isInstanceOf(DirectoryCreatedEvent.class);
DirectoryCreatedEvent dce = (DirectoryCreatedEvent) this.config.events.get(1);

View File

@@ -94,7 +94,7 @@ public class FtpRemoteFileTemplateTests extends FtpTestSupport {
template.execute((SessionCallbackWithoutResult<FTPFile>) session -> {
assertThat(session.remove("foo/foobar.txt")).isTrue();
assertThat(session.rmdir("foo/bar/")).isTrue();
await().atMost(Duration.ofSeconds(10)).until(() -> session.list("foo/"), files -> files.length == 0);
await().atMost(Duration.ofSeconds(20)).until(() -> session.list("foo/"), files -> files.length == 0);
assertThat(session.rmdir("foo/")).isTrue();
});
assertThat(template.exists("foo")).isFalse();