-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
test: fix flaky tests #12253
test: fix flaky tests #12253
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12253 +/- ##
==========================================
- Coverage 66.20% 63.04% -3.16%
==========================================
Files 996 1002 +6
Lines 49174 49217 +43
Branches 4993 5000 +7
==========================================
- Hits 32554 31028 -1526
- Misses 16476 17989 +1513
- Partials 144 200 +56
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
If it's possible to patch the app.config
dict I'd prefer that approach. Other than that very nice!
tests/databases/api_tests.py
Outdated
@@ -347,6 +347,7 @@ def test_create_database_fail_sqllite(self): | |||
""" | |||
Database API: Test create fail with sqllite | |||
""" | |||
app.config["PREVENT_UNSAFE_DB_CONNECTIONS"] = True |
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.
To make these even more resilient to flakery, I believe patching the dict would be the best option here, like here:
https://github.com/apache/incubator-superset/blob/164db3e5a13c21137afb56a3044ef3f1aaf89e11/tests/charts/api_tests.py#L1108-L1110
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.
Sure, good idea. Done
SUMMARY
Fix a few flaky tests:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION