-
-
Notifications
You must be signed in to change notification settings - Fork 84
Fix CI failures by adding sleep backoff #870
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
Fix CI failures by adding sleep backoff #870
Conversation
teardown(() => { | ||
sinon.restore(); | ||
}); | ||
standardSuiteSetup(this); |
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.
Notice how for some tests we were retrying 3 times, other times 5. I put this standard preamble into a utility function to encourage consistency
|
||
// Check that setSelection is able to focus the correct cell | ||
suite("Within cell set selection", async function () { | ||
this.timeout("100s"); | ||
this.retries(3); |
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.
In particular, notice that the test that was failing in CI was only retrying 3 times, instead of the usual 5
@@ -24,7 +18,7 @@ async function runTest() { | |||
|
|||
// FIXME: There seems to be some timing issue when you create a notebook | |||
// editor | |||
await sleep(1000); | |||
await sleepWithBackoff(1000); |
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.
This will now cause it to sleep 250ms, then 500ms, 1s, 2s, 4s. Hopefully that will both speed things up locally, while resolving the CI issues on Mac / Win
Ok green 8 times in a row (the two "failures" in that streak are pre-commit complaining that there's a newer commit). Hopefully this one will last us a while 🤞 |
Instead of sleeping the same amount of time every time we run a test, we double the sleep every time
Fixes #845
Checklist