Opened 12 months ago
Closed 12 months ago
#34193 closed Bug (duplicate)
TestCase _fixture_teardown breaks database MIRROR usage
Reported by: | Jean-Daniel | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 4.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The TestCase class _fixture_teardown() implementation try to iterate over all databases while it should ignore MIRROR databases.
Trying to include MIRROR database in the iteration loop make the teardown be execute twice on the database and raise an exception.
for db_name in reversed(self._databases_names()):
Should be
for db_name in reversed(self._databases_names(include_mirrors=False)):
Note: See
TracTickets for help on using
tickets.
I think it's a duplicate of #23718.
TEST['MIRROR']
requiresTransactionTestCase
to work with multiple databases.