From 87f62b5ec1b70f19f4708da344e8a5fe428780da Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Mon, 14 Jun 2010 00:23:25 +0000 Subject: [PATCH] Fix timing problem in TcpOutboundGateway tests. --- .../integration/ip/tcp/SimpleTcpNetOutboundGatewayTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/SimpleTcpNetOutboundGatewayTests.java b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/SimpleTcpNetOutboundGatewayTests.java index a304b5fc51..fce231bf93 100644 --- a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/SimpleTcpNetOutboundGatewayTests.java +++ b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/SimpleTcpNetOutboundGatewayTests.java @@ -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();