Skip to content

Commit a89876c

Browse files
committed
Make the timeout test more resilient
Since we don't keep timers sorted by deadline but by insertion order, the test is flaky in slow environments (GHA seemingly). Increase the timeouts to give it a bigger chance of success.
1 parent 61c8fe6 commit a89876c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_std.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ function test_timeout()
278278
function test_timeout_order()
279279
{
280280
var s = "";
281-
os.setTimeout(a, 1);
282-
os.setTimeout(b, 2);
283-
os.setTimeout(d, 5);
284-
function a() { s += "a"; os.setTimeout(c, 0); }
281+
os.setTimeout(a, 100);
282+
os.setTimeout(b, 200);
283+
os.setTimeout(d, 500);
284+
function a() { s += "a"; os.setTimeout(c, 200); }
285285
function b() { s += "b"; }
286286
function c() { s += "c"; }
287287
function d() { assert(s === "abc"); } // not "acb"

0 commit comments

Comments
 (0)