Minimal fix on waiting time in TrafficShaping test
Motivation: Possibly due to very small time (< 100ms), the trafficShaping time might be a bit high in rare condition. Modification: Remove extra time (only stepms is kept, not minimalms). Result: Time shall be ok now.
This commit is contained in:
parent
0258772deb
commit
2a0d8818f1
@ -176,7 +176,7 @@ public class TrafficShapingHandlerTest {
|
|||||||
minimalWaitBetween[0] = 0;
|
minimalWaitBetween[0] = 0;
|
||||||
for (int i = 0; i < multipleMessage.length; i++) {
|
for (int i = 0; i < multipleMessage.length; i++) {
|
||||||
if (multipleMessage[i] > 1) {
|
if (multipleMessage[i] > 1) {
|
||||||
minimalWaitBetween[i + 1] = (multipleMessage[i] - 1) * stepms + minimalms;
|
minimalWaitBetween[i + 1] = (multipleMessage[i] - 1) * stepms;
|
||||||
} else {
|
} else {
|
||||||
minimalWaitBetween[i + 1] = 10;
|
minimalWaitBetween[i + 1] = 10;
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ public class TrafficShapingHandlerTest {
|
|||||||
long[] minimalWaitBetween = new long[multipleMessage.length + 1];
|
long[] minimalWaitBetween = new long[multipleMessage.length + 1];
|
||||||
for (int i = 0; i < multipleMessage.length; i++) {
|
for (int i = 0; i < multipleMessage.length; i++) {
|
||||||
if (multipleMessage[i] > 1) {
|
if (multipleMessage[i] > 1) {
|
||||||
minimalWaitBetween[i] = (multipleMessage[i] - 1) * stepms + minimalms;
|
minimalWaitBetween[i] = (multipleMessage[i] - 1) * stepms;
|
||||||
} else {
|
} else {
|
||||||
minimalWaitBetween[i] = 10;
|
minimalWaitBetween[i] = 10;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user