race conditions are cool
This commit is contained in:
parent
c412bf7bd5
commit
e0535c7298
|
@ -57,7 +57,10 @@ public class TcpCommunicationIntegrationTest {
|
||||||
int value = 239;
|
int value = 239;
|
||||||
ConfigurationImage serverImage = prepareImage(value, iniField);
|
ConfigurationImage serverImage = prepareImage(value, iniField);
|
||||||
int port = 6100;
|
int port = 6100;
|
||||||
BinaryProtocolServer server = createVirtualController(serverImage, port, null);
|
|
||||||
|
CountDownLatch serverCreated = new CountDownLatch(1);
|
||||||
|
BinaryProtocolServer server = createVirtualController(serverImage, port, parameter -> serverCreated.countDown());
|
||||||
|
assertTrue(serverCreated.await(30, TimeUnit.SECONDS));
|
||||||
|
|
||||||
CountDownLatch connectionEstablishedCountDownLatch = new CountDownLatch(1);
|
CountDownLatch connectionEstablishedCountDownLatch = new CountDownLatch(1);
|
||||||
|
|
||||||
|
@ -94,12 +97,7 @@ public class TcpCommunicationIntegrationTest {
|
||||||
int controllerPort = 6102;
|
int controllerPort = 6102;
|
||||||
|
|
||||||
CountDownLatch serverCreated = new CountDownLatch(1);
|
CountDownLatch serverCreated = new CountDownLatch(1);
|
||||||
BinaryProtocolServer server = createVirtualController(serverImage, controllerPort, new Listener() {
|
BinaryProtocolServer server = createVirtualController(serverImage, controllerPort, parameter -> serverCreated.countDown());
|
||||||
@Override
|
|
||||||
public void onResult(Object parameter) {
|
|
||||||
serverCreated.countDown();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
assertTrue(serverCreated.await(30, TimeUnit.SECONDS));
|
assertTrue(serverCreated.await(30, TimeUnit.SECONDS));
|
||||||
int proxyPort = 6103;
|
int proxyPort = 6103;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue