-
Notifications
You must be signed in to change notification settings - Fork 192
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
Intermittent errors in tests #1470
Comments
@brizental yeah, I have same weird results. I don't know why, while test have passed with Travis ... |
@brizental this is definitely something for Outreachy to investigate! :) |
So, apparently these errors are not only happening in the tests from the |
So, I wrote a small script to run tests and save the failures results, to let them run multiple times and figure out exactly which tests are failing intermittently. I let them run overnight around 700 times and what I found out is that these are our intermittent failures:
If I set a big timeout for the find functions the tests stop failling and the more potent the machine they are run on, the less they fail. @miketaylr that's it for now. |
Thanks for reporting your findings @brizental -- all except the first are related to keyboard events. 🤔 The first has a lot of |
While getting everything right for #1671 I think I figured out how to fix this, finally. Looking at Leadfoot's documentation (https://theintern.github.io/leadfoot/module-leadfoot_Command.html#methods) I realized that most of the functions that get us in trouble return Promises, but in our code we use them as if they were synchronous functions. That's probably why we get less errors when running tests in more potent computers and why sometimes stuff works in our local machines but not in Travis. I changed the issues-auth.js with that in mind and now everything seems to be working everywhere (https://github.com/webcompat/webcompat.com/pull/1671/files#diff-2c9e405d1862dd6a302519583a505d13). I think seeing this code example will get everything to make more sense. The only problem that I see in this is that it has the potential for turning our test scripts into callback hell. But anyways, what do you think @miketaylr ? |
Can you give some examples? The whole point of Promises is that you can treat them as if they were sync, and that they shouldn't progress down the promise chain until the previous promise resolves (or gets rejected...) |
callback hell doesn't really bother me, fwiw. |
Closing this because this doesn't happen anymore. |
I have played these tests four times, one after the other and each time I got a different result.
The first time I got these errors:
The second time no errors.
The third time only the
Pressing g goes to github issues
error.And the fourth time only the
Pagination dropdown tests
error.I tried them manually and it seems like everything is working, so I don't know why they are failling sometimes.
The text was updated successfully, but these errors were encountered: