-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a waitForScripting
helper function and use it in all scripting integration tests
#18405
Introduce a waitForScripting
helper function and use it in all scripting integration tests
#18405
Conversation
…pting integration tests Code inspection uncovered that quite a few integration tests don't wait for scripting to be ready before proceeding, which is a source of intermittent failures, especially on slower machines where e.g. creating the sandbox takes longer. This commit fixes the issues by introducing a `waitForScripting` helper function and calling it consistently in all scripting integration tests.
0b4f04a
to
b540b63
Compare
I have looked into the impact of this change with diff 1 from #18396 (comment). This idea is to bring tests that don't properly await scripting initialization to the surface by slowing down sandbox creation, similar to what would happen on a slower machine such as the Windows bot. Before this patch running only the scripting integration tests with diff 1 applied resulted in 5 failures (note that we have seen some of them before on the bots):
However, note that we are lucky with only 5 failures. There were quite a few more tests that didn't await scripting initialization, but those passed more-or-less "accidentally" because they are in the same Therefore, the only reason there wasn't more breakage is because we always run the integration tests in a fixed order, which is in contrast to the unit tests that we run in a random order and which would be nice to fix later. If we would run them in a random order those tests can't depend on the first test in the block to fix this for them anymore. This patch therefore also gets rid of an implicit dependency in the tests, which is a step towards eventually randomizing them. After this patch running only the scripting integration tests with diff 1 applied resulted in no failures anymore:
|
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/4c9b86873c4b736/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/c169167d256b2da/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/c169167d256b2da/output.txt Total script time: 7.95 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/4c9b86873c4b736/output.txt Total script time: 16.84 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
Code inspection uncovered that quite a few integration tests don't wait for scripting to be ready before proceeding, which is a source of intermittent failures, especially on slower machines where e.g. creating the sandbox takes longer.
This commit fixes the issues by introducing a
waitForScripting
helper function and calling it consistently in all scripting integration tests.Fixes a part of #18396.