Skip to content

dbtest: Always rollback transaction, even if test failed

Warren Gifford requested to merge always-rollback-test-tx into master

Created by: mrnugget

I'm not sure why we we never rolled back a transaction, nor committed it. I suspect the idea was to leave test state available in the test database. But if the transaction is never committed, that state is never available anyway.

And with the previous behaviour I can into problems when multiple tests, such as the ones in campaigns.TestIntegration, use the same test database and one of the tests fails. The failing test then leaves a transaction dangling, which can block other tests.

Merge request reports

Loading