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:
parent
7710e7da44
commit
b830959ff7
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user