﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36496	SQLite test database path not recognised when running tests in parallel	Damian Posener	Gangadhar Yadav	"How to replicate:

1. Have a DATABASES configuration with one or more SQLite DBs in directories, like this:
{{{
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db' / 'default' / 'db.sqlite3',
    },
    'other': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db' / 'other' / 'db.sqlite3',
    }
}
}}}
2. Run tests with both the `--parallel=auto` and `--keepdb` flags, i.e. `python manage.py test --keepdb --parallel=auto`

Expected behaviour: `.sqlite3` files should be kept in `db/default` and `db/other` directories

Actual behaviour: `default_X.sqlite3` and `other_X.sqlite3` files are saved in the root directory instead

Why is this a problem? When running multiple test suites at once, this leads to filename collision if two test suites are using the same database name(s). It is impossible to run two Django test suites in parallel from the same directory without encountering this issue.

Setting `DATABASES['<alias>']['TEST']['NAME']` does not seem to solve this either.

I've put together an example project to demonstrate the issue. Simply run `python manage.py test --keepdb --parallel=auto` from the base directory.

Happy to answer any other questions. :)"	Bug	assigned	Testing framework	5.2	Normal			Abhishek Srivastava	Accepted	1	0	1	0	0	0
