Fix timing problem in TcpOutboundGateway tests.

This commit is contained in:
Gary Russell
2010-06-14 00:23:25 +00:00
parent b6974b712c
commit 87f62b5ec1

View File

@@ -165,9 +165,9 @@ public class SimpleTcpNetOutboundGatewayTests {
byte[] b = new byte[1024];
s.getInputStream().read(b);
s.getOutputStream().write("OK\r\n".getBytes());
latch2.countDown();
latch3.await();
s.close();
latch2.countDown();
}
} catch (Exception e) {
e.printStackTrace();
@@ -207,9 +207,9 @@ public class SimpleTcpNetOutboundGatewayTests {
if (!first)
s.getOutputStream().write("OK\r\n".getBytes());
first = false;
latch2.countDown();
latch3.await();
s.close();
latch2.countDown();
}
} catch (Exception e) {
e.printStackTrace();