-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Make AMP tests less flaky #14360
Comments
1. Stub experiment toggles by defaultSome sort of test-time replacement of 2. Forbid experiment toggles in testDisadvantage: tests need to be rewritten to stub a static method that checks for the experiment. 3. Force all services to be stubbed in testsServices are likely to affect global state since they're singletons. Implement some mechanism (similar to above) to either:
This would also reduce the running time of a lot of tests. |
AKA return of the prodigal son: /cc @lannka 😂 |
It turns out that several AMP tests do asynchronous stuff (like throwing errors), but don't correctly use the This is being tracked by #15658 |
FR: Run all tests in the scope of a child iframe such that Motivation: #16586 |
Reopening, since we still haven't solved the global |
Did we explore Karma option, how possible it is to open separate browser tab for each test file (not each test case). Another hacky idea regarding to the async code leakage (I don't quite like, but shared anyway): @rsimha we've talked a bit that if we can wait a full We couldn't have it done in I'm wondering if we can hack/wrap the |
This issue hasn't been updated in awhile. @rsimha Do you have any updates? |
1 similar comment
This issue hasn't been updated in awhile. @rsimha Do you have any updates? |
Since this was filed, several things have been done to improve test flakiness (see PRs linked above). However, more remains to be done in the areas of improving transitions during tests (#9164), fixing incorrect use of test assertions (#28128), and preventing external network requests (#26756). Keeping this uber-issue around until they are done. |
[Infra triage] Assigning this uber-issue to @rileyajones for visibility. It may no longer be useful to keep this issue around since most ideas have already been split off into separate efforts. Feel free to close if this is the case. |
Closing this now that all AMP unit and integration tests are sandboxed by |
The number of test failures / flakes during PR and push builds on Travis due to dirty global state appears to have increased over the recent weeks. It's time to explore ideas that will reduce flakiness by isolating tests from one another and eliminating dirty global state.
Some ideas:
beforeEach
andafterEach
in test/_init_tests.js to be more thorough with how they clear state between testswindow
object (with a newthis
) for each test (inefficient? infeasible?)(More ideas welcome via comments below)
The text was updated successfully, but these errors were encountered: