1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

test: process tests run outside the --parallel pool

The pool workers were made non-daemonic so the operations process
tests could start workers, but a terminated pool (Ctrl-C, --failfast)
left those workers running. The test runner now keeps the test cases
tagged "processes" out of the pool and runs them in the main process
after it. A WAL that cannot be written back before cloning now stops
the run instead of giving clones without tables. One CI leg runs the
suite with --parallel.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
catborise 2026-10-21 09:35:14 +03:00
parent 8e23138ef7
commit c4ab14db7f
4 changed files with 20 additions and 17 deletions

View file

@ -10,7 +10,7 @@ import time
from django.contrib.auth import get_user_model
from django.db import connections
from django.test import TransactionTestCase
from django.test import TransactionTestCase, tag
from operations import claims, jobs
from operations.models import Claim, Operation, WorkerLease
@ -49,6 +49,7 @@ def _submit(user_pk, results):
os._exit(0)
@tag("processes") # run outside the --parallel pool (webvirtcloud/test_runner.py)
class ProcessTestCase(TransactionTestCase):
def setUp(self):
self.ctx = multiprocessing.get_context("fork")