Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#34903 closed Bug (fixed)

Parallel test runner failure on Windows

Reported by: David Smith Owned by: David Sanders
Component: Testing framework Version: dev
Severity: Release blocker Keywords:
Cc: David Sanders Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

2128a73713735fb794ca6565fd5d7792293f5cfa introduced a regression when running the test suite in parallel mode on Windows.

The traceback is long, here's a snippet.

Process SpawnPoolWorker-47:
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\pool.py", line 109, in worker
    initializer(*initargs)
  File "C:\Users\smith\projects\django\django\test\runner.py", line 442, in _init_worker
    connection.creation.setup_worker_connection(_worker_id)
  File "C:\Users\smith\projects\django\django\db\backends\sqlite3\creation.py", line 145, in setup_worker_connection
    source_db = self.connection.Database.connect(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
Process SpawnPoolWorker-48:

Change History (8)

comment:1 by Simon Charette, 11 months ago

Cc: David Sanders added; David Sanders removed

comment:2 by Mariusz Felisiak, 11 months ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted
Version: 4.2dev

comment:3 by David Sanders, 11 months ago

Yep that is an option but I'd like to investigate why the worker is trying to open databases that don't exist 🤔 (provided I can setup a Windows VM)

comment:4 by David Sanders, 11 months ago

Has patch: set
Owner: changed from nobody to David Sanders
Status: newassigned

comment:5 by Mariusz Felisiak, 11 months ago

Patch needs improvement: set

comment:6 by GitHub <noreply@…>, 11 months ago

Resolution: fixed
Status: assignedclosed

In 68d0159b:

Fixed #34903, Refs #34825 -- Made workers initialization respect empty set of used connections.

Thanks to David Smith for the investigation & patch.

Regression in 2128a73713735fb794ca6565fd5d7792293f5cfa.
Follow up to a5905b164dbf52e59fa646af9c3d523c0804d86a.

Co-authored-by: David Sanders <shang.xiao.sanders@…>

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 11 months ago

In 08aa336a:

[5.0.x] Fixed #34903, Refs #34825 -- Made workers initialization respect empty set of used connections.

Thanks to David Smith for the investigation & patch.

Regression in 2128a73713735fb794ca6565fd5d7792293f5cfa.
Follow up to a5905b164dbf52e59fa646af9c3d523c0804d86a.

Co-authored-by: David Sanders <shang.xiao.sanders@…>
Backport of 68d0159b6dfce07f144045d56639c52066e8b90e from main

comment:8 by Mariusz Felisiak, 11 months ago

Patch needs improvement: unset
Note: See TracTickets for help on using tickets.
Back to Top