Better fix for TrafficShapingHandlerTest

Motivation:
It seems that in certain conditions, the write back from the server is so quick that the handler has no time to compute traffic shaping. So 10ms of wait before acknowledging is added in server side.

Modifications:
Add 10ms waiting before server ackonwledge the client.

Result:
The timing is now suppsed to be stable.
This commit is contained in:
Frédéric Brégier 2014-08-16 10:54:54 +02:00
parent b5f61d0de5
commit 0ca84b3527

View File

@ -500,6 +500,7 @@ public class TrafficShapingHandlerTest extends AbstractSocketTest {
} }
} }
} }
Thread.sleep(10);
loggerServer.debug("Step: " + step + " Write: " + nb); loggerServer.debug("Step: " + step + " Write: " + nb);
for (int i = 0; i < nb; i++) { for (int i = 0; i < nb; i++) {
channel.write(Unpooled.copyLong(timestamp)); channel.write(Unpooled.copyLong(timestamp));