Skip to content

Commit

Permalink
Fixed async tests sometimes waiting the full timeout even though the …
Browse files Browse the repository at this point in the history
…test group is completed
  • Loading branch information
chrisdp committed Feb 13, 2024
1 parent f9c9ab8 commit 7d7f10d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion framework/src/source/TestRunner.bs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,13 @@ namespace rooibos
timeout = testSuite.asyncTimeout = invalid ? 60000 : testSuite.asyncTimeout

? "Waiting max " timeout "ms for the test suite to finish"
m.waitForField(node, "rooibosSuiteFinished", 10, timeout / 10)
t = createObject("roTimespan")
while node.rooibosSuiteFinished = false
m.wait(10)
if t.totalMilliseconds() >= timeout
exit while
end if
end while
end if
end if
nodeResults = node.asyncRooibosTestResult
Expand Down

0 comments on commit 7d7f10d

Please sign in to comment.