test_postgres.py:
{{{
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "user",
"PASSWORD": "password",
"HOST": "127.0.0.1",
"PORT": "5432",
},
"other": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "user",
"PASSWORD": "password",
"HOST": "127.0.0.1",
"PORT": "5432",
},
}
SECRET_KEY = "django_tests_secret_key"
# Use a fast hasher to speed up tests.
PASSWORD_HASHERS = [
"django.contrib.auth.hashers.MD5PasswordHasher",
]
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
USE_TZ = False
}}}
Am I doing something wrong, or do these test cases hang for others? I
cloned the 4.1.x repo and reset it to 2ff479f to specifically test against
Django 4.1.4 and it consistently crashes *after*
`multiple_database.tests.AuthTestCase` runs. If I get it working, I'll
compile a list of test classes I have to skip to get the tests to run
through without hanging.
--
Ticket URL: <https://code.djangoproject.com/ticket/34222>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Egor R):
You have the same name for "default" and "other" databases, and they
should be different. Try changing that and see if that helps.
--
Ticket URL: <https://code.djangoproject.com/ticket/34222#comment:1>
* cc: Egor R (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/34222#comment:2>
* status: new => closed
* resolution: => invalid
Comment:
Replying to [comment:1 Egor R]:
> You have the same name for "default" and "other" databases, and they
should be different. Try changing that and see if that helps.
That solved it, knew it would probably be something incredibly dumb. Now
that I've done a little more Googling it looks like I should have just
copied the Django Docker Box config instead of writing my own.
It's interesting that there are no checks to see if there are two DB
configs for the same database, is there a use case for that?
--
Ticket URL: <https://code.djangoproject.com/ticket/34222#comment:3>
Comment (by Egor R):
I'm not that deeply involved with the project, so can't answer that. You
might want to start a discussion on the [https://forum.djangoproject.com/
Django forum] to gauge interest for that.
--
Ticket URL: <https://code.djangoproject.com/ticket/34222#comment:4>