Skip to content

Commit 7d7f10d

Browse files
committed
Fixed async tests sometimes waiting the full timeout even though the test group is completed
1 parent f9c9ab8 commit 7d7f10d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

framework/src/source/TestRunner.bs

+7-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,13 @@ namespace rooibos
252252
timeout = testSuite.asyncTimeout = invalid ? 60000 : testSuite.asyncTimeout
253253

254254
? "Waiting max " timeout "ms for the test suite to finish"
255-
m.waitForField(node, "rooibosSuiteFinished", 10, timeout / 10)
255+
t = createObject("roTimespan")
256+
while node.rooibosSuiteFinished = false
257+
m.wait(10)
258+
if t.totalMilliseconds() >= timeout
259+
exit while
260+
end if
261+
end while
256262
end if
257263
end if
258264
nodeResults = node.asyncRooibosTestResult

0 commit comments

Comments
 (0)