-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rearrange jasmine test retries #3667
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
Conversation
reduced number of retries for jasmine-2 reduced number of retries for jasmine-3 adjusted timeouts to help fix test errors on CI removed noCI tags from a number of tests set shards limit to 1 - fixed various side effects between different tests reduce n it limit to reduce side effects between different tests now we can reduce retries for both now test if we could remove some noCI flags from the tests reset few noCI flags final considerations
reset timeout and reduced delays set gl retry to 3
tasks/shard_jasmine_tests.js
Outdated
@@ -15,7 +15,7 @@ var argv = minimist(process.argv.slice(2), { | |||
limit: ['l'], | |||
}, | |||
default: { | |||
limit: 20 | |||
limit: 1 |
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.
So each test suite is runned separately?
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.
Yes. That's exactly what I wanted there for gl
and flaky
. I noticed e.g. setting timeout in one suite may have an effect on another suite. After having this in place the tests started to pass properly.
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.
Can you leave to default to 20
and pass a --limit 1
in the relevant test commands in .circleci/test.sh
.
Do all npm run test-jasmine
commands need to have --limit 1
?
@archmoj I'm a little puzzled by this PR. If it makes our tests on CI less flaky than great, but I'd like to why and how much less flaky they get.
Why does this help?
That sounds like an overkill to me. For example, if our tests are less flaky, but take 5x longer to run, this won't help us much. So yeah I'm asking you: after say CI 20 runs, are our tests 2x, 5x, 10x less flaky? How much slower are they?
🎉 nice!
👌 All in all, #3634 sounds more promising. It might be a good idea to wait until @antoinerg is done with that one before spending more time trying to monkey-patch our tests. |
@etpinard it seems more |
Cool. Can you re-run the tests 10 times and see what's the success rate? |
…lly and on the CI set timeout for the rest of the tests in one suite added one noCI flag to the sankey test which is failing on the CI and even locally with flaky flag set flaky retry to 5 now that it runs fast
After 10 runs the success rate seems to be around 80 percent i.e. including no |
Is that better than on |
@@ -20,6 +20,8 @@ function countCanvases() { | |||
return d3.selectAll('canvas').size(); | |||
} | |||
|
|||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000; |
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.
Does this apply only to this test suite or to all test suites that get bundled?
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.
Good question. I noticed when using shard with high limit number (e.g. 20), changing a timout in one test has an impact on the other tests in another suites. That may be one reason to try to keep them separated. Anyway a better solution may be to have a timeout setup for every suite/describe block to avoid side effects?
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.
Anyway a better solution may be to have a timeout setup for every suite/describe block to avoid side effects?
Yes, that's a better solution.
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.
@etpinard @antoinerg Any default value there to start with? Should they be set for every describe block? Or having them in every suites is only required?
.circleci/test.sh
Outdated
|
||
log () { | ||
echo -e "\n$1" | ||
} | ||
|
||
# inspired by https://unix.stackexchange.com/a/82602 | ||
MAX_AUTO_RETRY=1 |
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.
Why would we want to lower MAX_AUTO_RETRY
?
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.
It looks flaky tests (jasmine3) sometime required more retries. The gl tests on the other hand are slow and may not need that number of retries. Specially if they fail for a good reason, we don't want to wait too long to be notified that the test is actually failed.
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.
The gl tests on the other hand are slow and may not need that number of retries.
Well, I suspect the gl tests are slow (now) because you reduced the number of test per shards to 1.
To me, having MAX_AUTO_RETRY=5
for all retry loops is the best of both world. Sufficient retry attempt, but failing runs that take to long to exit.
Always hard to tell which one is better. On this branch less noCI flags are applied with less retries. I hope that less is more and that we can have even more robust tests. |
I agree, there's a lot of good on this branch, no doubt. Here are my recommendations (to get this thing merged):
|
reset shard limit to 20 and retry to 5 revised timout as well as before and after functions in describe blocks in gl2d_plot_interact_test lower the shard limit for the non-gl test-jasmine commands
@etpinard Thanks for the recommendations. |
Ok, let's get this in 💃 |
A follow up of #3661 and #3599 in order to have more robust jasmine tests with less retries
noCI
tags from a number of tests such as gl2d lasso/select & parcoods.@plotly/plotly_js