From 75a2af56793e27d50c744a87cb28b748c59db62a Mon Sep 17 00:00:00 2001 From: Niall Gallagher Date: Fri, 2 Oct 2015 01:05:45 +0100 Subject: [PATCH] Yield the thread on the client writer --- .../simpleframework/http/message/ContainerPerformanceTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simple/simple-http/src/test/java/org/simpleframework/http/message/ContainerPerformanceTest.java b/simple/simple-http/src/test/java/org/simpleframework/http/message/ContainerPerformanceTest.java index b558a6d..6cc2c3a 100644 --- a/simple/simple-http/src/test/java/org/simpleframework/http/message/ContainerPerformanceTest.java +++ b/simple/simple-http/src/test/java/org/simpleframework/http/message/ContainerPerformanceTest.java @@ -153,6 +153,7 @@ public void run() { client.write(ByteBuffer.wrap(SOURCE_2)); client.write(ByteBuffer.wrap(SOURCE_3)); client.write(ByteBuffer.wrap(SOURCE_4)); + Thread.sleep(1); } client.write(ByteBuffer.wrap(CLOSE)); client.close(); @@ -177,7 +178,7 @@ public void run() { dumper.kill(); } - // This is a container that counts the callbacks/requests it gets + // This is a container that counts the callbacks/requests it gets and sends a valid HTTP/1.1 response private class CounterContainer implements Container { private final AtomicInteger counter;