Merge pull request #454 from garyrussell/INT-2581
* INT-2581: INT-2581 Fix Failing Test (Timing)
This commit is contained in:
@@ -144,9 +144,11 @@ public class SocketSupportTests {
|
||||
});
|
||||
final AtomicInteger ppSocketCountServer = new AtomicInteger();
|
||||
final AtomicInteger ppServerSocketCountServer = new AtomicInteger();
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
TcpSocketSupport serverSocketSupport = new TcpSocketSupport() {
|
||||
public void postProcessSocket(Socket socket) {
|
||||
ppSocketCountServer.incrementAndGet();
|
||||
latch.countDown();
|
||||
}
|
||||
public void postProcessServerSocket(ServerSocket serverSocket) {
|
||||
ppServerSocketCountServer.incrementAndGet();
|
||||
@@ -156,6 +158,7 @@ public class SocketSupportTests {
|
||||
serverConnectionFactory.start();
|
||||
waitListening(serverConnectionFactory);
|
||||
clientConnectionFactory.getConnection().send(new GenericMessage<String>("Hello, world!"));
|
||||
assertTrue(latch.await(10, TimeUnit.SECONDS));
|
||||
assertEquals(0, ppServerSocketCountClient.get());
|
||||
assertEquals(1, ppSocketCountClient.get());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user