#34010: Parallel tests don't work
---------------------------------------------+------------------------
               Reporter:  Kevin Renskers     |          Owner:  nobody
                   Type:  Bug                |         Status:  new
              Component:  Testing framework  |        Version:  4.1
               Severity:  Normal             |       Keywords:
           Triage Stage:  Unreviewed         |      Has patch:  0
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  0
                  UI/UX:  0                  |
---------------------------------------------+------------------------
 I've upgraded to Django 4.1.1 and parallel tests don't work, but now with
 a different error as what I got in 4.1 (see #33891).


 {{{
 $ ./manage.py test --parallel
 Found 153 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'...
 Cloning test database for alias 'default'...
 Cloning test database for alias 'default'...
 System check identified no issues (0 silenced).
 Process SpawnPoolWorker-2:
 Traceback (most recent call last):
   File
 
"/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py",
 line 314, in _bootstrap
     self.run()
   File
 
"/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py",
 line 108, in run
     self._target(*self._args, **self._kwargs)
   File
 
"/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/pool.py",
 line 114, in worker
     task = get()
   File
 
"/opt/homebrew/Cellar/[email protected]/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/queues.py",
 line 367, in get
     return _ForkingPickler.loads(res)
   File "/Users/kevin/Workspace/cn-
 django/criticalnotes/auth/test_models.py", line 5, in <module>
     from criticalnotes.auth.models import User
   File "/Users/kevin/Workspace/cn-django/criticalnotes/auth/models.py",
 line 10, in <module>
     class User(models.Model):
   File "/Users/kevin/Workspace/cn-django/env/lib/python3.10/site-
 packages/django/db/models/base.py", line 127, in __new__
     app_config = apps.get_containing_app_config(module)
   File "/Users/kevin/Workspace/cn-django/env/lib/python3.10/site-
 packages/django/apps/registry.py", line 260, in get_containing_app_config
     self.check_apps_ready()
   File "/Users/kevin/Workspace/cn-django/env/lib/python3.10/site-
 packages/django/apps/registry.py", line 138, in check_apps_ready
     raise AppRegistryNotReady("Apps aren't loaded yet.")
 django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
 }}}

 (That error then repeat 26 times in my case).

 If I run the tests just with `./manage.py test`, everything works fine.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34010>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701833c68cb50-abcd88b0-0a38-472e-8bed-c312d1be3064-000000%40eu-central-1.amazonses.com.

Reply via email to