-
-
Notifications
You must be signed in to change notification settings - Fork 926
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
Use DatabaseCleaner gem to remove bad test state #5214
base: master
Are you sure you want to change the base?
Conversation
2c03bd8
to
a468f37
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5214 +/- ##
=======================================
Coverage 96.75% 96.75%
=======================================
Files 430 430
Lines 9120 9120
=======================================
Hits 8824 8824
Misses 296 296 ☔ View full report in Codecov by Sentry. |
Any idea which test left this? |
@simi no, it seems to happen pretty reliably if you interrupt the tests, but running all integration tests on the organizations branch seemed to trigger it. This isn't just a rare thing for me though, it happens all the time. The ApiKey one has been happening for a while. Even just clearing the database at the start rather than after each test would make a big difference. |
@@ -99,6 +102,7 @@ class ActiveSupport::TestCase | |||
|
|||
teardown do | |||
Rails.configuration.launch_darkly_client.close | |||
DatabaseCleaner.clean |
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.
We could remove this and just clear at the start of each run. This would solve the main problem I see.
Do you think it is related to system tests? |
Should fix the regular problem where test state can be left in the database, which causes errors like the following: