-
Notifications
You must be signed in to change notification settings - Fork 524
use transactional test case whenever we use setup_all #70001
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 transactional test case whenever we use setup_all #70001
Conversation
156f5ac to
f7a0d43
Compare
|
Thanks for looking into this! I'm curious if it's possible to maybe patch something in our test stack so that |
@etaderhold I think this is worth looking into! I'm fairly confident I know how to do this with a lint rule -- I have a couple of ideas for how this might be possible by setting use_transactional_test_case automatically based on the presence of setup_all in the test case, which I'd be willing to try when I get to this. However, in part due to the following weird logic, my confidence is a bit low in the viability of that approach: code-dot-org/dashboard/test/testing/setup_all_and_teardown_all.rb Lines 14 to 27 in b9c150b
In any case I'd like to leave that investigation as separate from this PR. |
This reverts commit 1339cab.
An unexplained dashboard unit test failure prompted me to investigate a hunch about using
setup_allwithoutuse_transactional_test_case. as you can see from the first drone run, we are not properly cleaning up objects insidesetup_allifuse_transactional_test_caseis not also specified. in that commit, I added some intentionally collidingcreatecommands, and we get errors like this:plus many more errors and failures which cascade from these.
The short-term fix is to add
use_transactional_test_casewherever we usesetup_all, which fixes the above failures.I generated the list of files to update with this command:
Testing story
Follow-up work
use_transactional_test_casewhenever we usesetup_all