Opened 9 years ago

Closed 9 years ago

#25357 closed Bug (fixed)

setup_databases doesn't deduplicate databases correctly on Oracle

Reported by: Aymeric Augustin Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The short version is that, when setup_databases detects that two databases are identical, it does connection.settings_dict['NAME'] = ... instead of calling connection.creation.set_as_test_mirror().

I'm going to attach a project that allows reproducing the issue. (Unfortunately, we don't have a convenient way to test the test runner's database creation features.)

If you set DATABASES = DATABASES_POSTGRES in the settings, the test passes.

If you set DATABASES = DATABASES_ORACLE in the settings, the test fails with myapp.models.DoesNotExist: MyModel matching query does not exist..

Attachments (1)

oracle_test_mirror.tar.gz (1.3 KB ) - added by Aymeric Augustin 9 years ago.

Download all attachments as: .zip

Change History (3)

by Aymeric Augustin, 9 years ago

Attachment: oracle_test_mirror.tar.gz added

comment:2 by Aymeric Augustin <aymeric.augustin@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 79c3f22:

Fixed #25357 -- Database deduplication on Oracle.

In order to reuse another database, Django must use set_as_test_mirror.

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