#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)):

Change History (1)

comment:1 by Mariusz Felisiak, 18 months ago

Resolution: duplicate
Status: newclosed

I think it's a duplicate of #23718. TEST['MIRROR'] requires TransactionTestCase to work with multiple databases.

Note: See TracTickets for help on using tickets.
Back to Top