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:55:38 +02:00
parent 7710e7da44
commit b830959ff7

View File

@ -498,6 +498,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));