Loosen test timing to pass on Windows on the CI infrastructure.

This commit is contained in:
Sönke Ludwig 2020-03-15 20:38:44 +01:00
parent 00b8607fc1
commit e66b29d8df
2 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ void main()
} }
try { try {
assert(dur > 1200.msecs, (dur - 1200.msecs).toString()); assert(dur > 1200.msecs - 2.msecs, (dur - 1200.msecs).toString());
assert(dur < 1300.msecs, (dur - 1200.msecs).toString()); assert(dur < 1300.msecs, (dur - 1200.msecs).toString());
} catch (Exception e) assert(false, e.msg); } catch (Exception e) assert(false, e.msg);
@ -38,7 +38,7 @@ void main()
try { try {
auto dur = MonoTime.currTime() - s_startTime; auto dur = MonoTime.currTime() - s_startTime;
s_cnt++; s_cnt++;
assert(dur > 300.msecs * s_cnt, (dur - 300.msecs * s_cnt).toString()); assert(dur > 300.msecs * s_cnt - 2.msecs, (dur - 300.msecs * s_cnt).toString());
assert(dur < 300.msecs * s_cnt + 100.msecs, (dur - 300.msecs * s_cnt).toString()); assert(dur < 300.msecs * s_cnt + 100.msecs, (dur - 300.msecs * s_cnt).toString());
assert(s_cnt <= 3); assert(s_cnt <= 3);

View file

@ -44,7 +44,7 @@ void main()
auto dur = MonoTime.currTime() - s_startTime; auto dur = MonoTime.currTime() - s_startTime;
s_cnt++; s_cnt++;
assert(dur > 300.msecs * s_cnt, (dur - 300.msecs * s_cnt).toString()); assert(dur > 300.msecs * s_cnt - 2.msecs, (dur - 300.msecs * s_cnt).toString());
assert(dur < 300.msecs * s_cnt + 100.msecs, (dur - 300.msecs * s_cnt).toString()); assert(dur < 300.msecs * s_cnt + 100.msecs, (dur - 300.msecs * s_cnt).toString());
assert(s_cnt <= 5); assert(s_cnt <= 5);