Yeah, the way my library code works, each step is tried until it succeeds or we run out of time for the test case:
case.GameTestCase_can_load_a_collection_under_test = function(self)
-- Given
local proxy = "/tests#testproxy1"
self.util.loadCollection(proxy) -- step 1: load collection
self.gassert.receivedMessage(hash("proxy_loaded")) -- wait for proxy_loaded event
self.util.initCollection(proxy) -- step 2: send init & enable events
-- When Then
self.gassert.gameObjectExists("undertest:/xunit_is_cool") -- wait for assert to become true
end
EDIT: fix to show non-working assert above.
This runs 3 seconds and times out:
DEBUG:SCRIPT: Suite: Game Tests Suite
DEBUG:SCRIPT: GameTestCaseTests.GameTestCase_can_load_a_collection_under_test: FAIL (3.013s; 217 frames)
DEBUG:SCRIPT: Timed out, last error: main/xunit.script:194: Expected 'undertest:/xunit_is_cool' to exist
DEBUG:SCRIPT: 1 run, 1 failed
Which I think is enough time, because in the case with the working url it completes very quickly:
DEBUG:SCRIPT: Suite: Game Tests Suite
DEBUG:SCRIPT: GameTestCaseTests.GameTestCase_can_load_a_collection_under_test: OK (0.066s; 5 frames)
DEBUG:SCRIPT: 1 run, 0 failed