Opened 3 years ago

Last modified 3 years ago

#32872 closed New feature

Parallel Unit tests fail to clone DBs with TimescaleDB — at Initial Version

Reported by: Kenneth Fortner Owned by: nobody
Component: Database layer (models, ORM) Version: 3.2
Severity: Normal Keywords: Timescale
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you use a TimescaleDB and run your unit tests in parallel Django will fail to clone the first test database to the additional databases.

Cloning test database for alias 'foo' ('foo_testDB')...Got an error creating the test database: source database "foo_testDB" is being accessed by other users
DETAIL: There is 1 other session using the database.

#### DB Section
DATABASES = {

'default': {

'ENGINE': 'django.db.backends.postgresql_psycopg2',
'HOST': 'timescale',
'USER': "user",
'NAME': 'fooDB',
'PASSWORD': "pwd",
'PORT': '5432',
'TEST': {

'NAME': foo_testDB

}

}

#### Test call
python manage.py test --parallel 4

Change History (0)

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