Closed ellbosch closed 4 years ago
@pensivebrian I've made the suggested changes, please let me know your thoughts.
We still need to fix the known issue in the Special module but I can submit that in a separate PR.
I just added another commit to improve reliability of our tests:
Another change today to improve DB create reliability and code quality:
test_interactive_mode.py
no longer use master DB.test_db
fixture has been added to mssqltestutils.py
to centralize redundant use of create and teardown of test DBs.I think the PR is becoming too complicated. I can tell what's stabilization and what is pytest migration. Can we just fix the create database issue, an address pytest some other time?
I can simplify this a bit—unfortunately, most of the code changes were about ensuring tests can run off of the master DB (which because a requirement now that we call sys.dm_operation_status
).
However, I did refactor things a little in test_special.py
, which I can save for another day 🙂
@pensivebrian I made a small tweak to our helper method to return an error message with the state response in the form of a tuple.
Closes #280.
This PR introduces retry logic to check the status of a db creation using
sys.dm_operation_status
.