-
Notifications
You must be signed in to change notification settings - Fork 3.8k
connection_checker_test.js has flaky tests #8688
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
Comments
Note that I just ran the entire Mocha test suite 100 times and these two tests were the only ones flaky for me (the most recent run showed the 'do not splice' test as 8% flaky and the 'connect to bottom of unmovable stack' test as 11% flaky). I also did a run of just those two flaky tests in isolation over 1000 runs to get a better estimate of flakiness. Over 1000 runs:
|
I'm not sure who has been affected by these flakes in CI, but I just ran into one of them in #8689. |
#8743 ran into this again today. Still unclear as to the cause. |
I was able to reproduce this locally with some additional logging. It looks like the sorting of getAllBlocks is inconsistent, which leads to the wrong blocks being assigned during the suite setup. Here's an example log where I printed out the blocks being used for the test along with what Block they were expected to be: "Connection checker Dragging Checks Stacks Connect to bottom of unmovable stack" failed: Should connect below an unmovable stack block Block C: <block xmlns="https://developers.google.com/blockly/xml" type="text_print" id="B" movable="false" x="64" y="61"></block>: expected false to be true |
Check for duplicates
Description
Sometimes when running
npm run test
locally, I see failures inconnection_checker_test.js
. I found this while investigating #8676 and it occurs to me that it could be environment specific.The specific tests failing are:
Reproduction steps
Some techniques that I find helpful:
CI=true npm run test
.mocha
fromtasks
inscripts/gulpfiles/test_tasks.js
(so that only Mocha tests run).suite
call withsuite.only
intests/mocha/connection_checker_test.js
(so that only this suite runs).Stack trace
Output from running
run_blockly_tests.main.kts
per the Gist above:The failure for the 'Connection checker Dragging Checks Stacks Connect to bottom of unmovable stack' test was:
I didn't collect the stack trace of the other test failure.
Screenshots
N/A since this is a test assertion flake.
Browsers
No response
The text was updated successfully, but these errors were encountered: