Opened 3 years ago

Closed 3 years ago

#32988 closed Bug (fixed)

The number of test databases should not be greater than number of TestCases.

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: Testing framework Version: 4.0
Severity: Release blocker Keywords:
Cc: Chris Jerdonek, Ceesjan Luiten Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The number of test databases should not be greater than number of TestCases, e.g.

./manage.py test --parallel=8
Found 1 test(s).
Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
System check identified some issues:

.
----------------------------------------------------------------------
Ran 1 test in 0.007s

OK
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...

Regression in cb6c19749d342c3dc0f97d89ff6887b220cf45b8, noticed when fighting with PR.

Change History (3)

comment:1 by Mariusz Felisiak, 3 years ago

Has patch: set

comment:2 by Carlton Gibson, 3 years ago

Triage Stage: UnreviewedAccepted

comment:3 by GitHub <noreply@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In ab16507f:

Fixed #32988 -- Prevented creation of more test databases than TestCases.

DiscoverRunner.parallel is used in setup_databases() and
teardown_databases() to control the number of test databases.

Regression in cb6c19749d342c3dc0f97d89ff6887b220cf45b8.

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