Remove redundant use of IO executor.

This commit is contained in:
akwizgran
2019-06-04 14:23:47 +01:00
parent 9ffd1ec2c2
commit c536782e01

View File

@@ -172,17 +172,13 @@ public class ContactExchangeIntegrationTest extends BrambleTestCase {
alice.getEventBus().addListener(e -> { alice.getEventBus().addListener(e -> {
if (e instanceof ContactAddedEvent) aliceFinished.countDown(); if (e instanceof ContactAddedEvent) aliceFinished.countDown();
}); });
alice.getIoExecutor().execute(() ->
alice.getConnectionManager().manageOutgoingConnection( alice.getConnectionManager().manageOutgoingConnection(
bobFromAlice.getId(), DUPLEX_TRANSPORT_ID, bobFromAlice.getId(), DUPLEX_TRANSPORT_ID, aliceConnection);
aliceConnection));
bob.getEventBus().addListener(e -> { bob.getEventBus().addListener(e -> {
if (e instanceof ContactAddedEvent) bobFinished.countDown(); if (e instanceof ContactAddedEvent) bobFinished.countDown();
}); });
bob.getIoExecutor().execute(() ->
bob.getConnectionManager().manageIncomingConnection( bob.getConnectionManager().manageIncomingConnection(
aliceFromBob.getId(), DUPLEX_TRANSPORT_ID, aliceFromBob.getId(), DUPLEX_TRANSPORT_ID, bobConnection);
bobConnection));
assertTrue(aliceFinished.await(TIMEOUT, MILLISECONDS)); assertTrue(aliceFinished.await(TIMEOUT, MILLISECONDS));
assertTrue(bobFinished.await(TIMEOUT, MILLISECONDS)); assertTrue(bobFinished.await(TIMEOUT, MILLISECONDS));
assertContacts(false, true); assertContacts(false, true);