Skip to content

tests/test_main_window_batch_launcher.py hangs indefinitely under the full suite #103

Description

@martinasencio-gm

Reproduces on master (confirmed via git stash), so it predates any recent work — filed while investigating 3 unrelated pre-existing test failures found alongside #100.

Symptom: running the full suite (pytest tests/ -q) or this file combined with other MainWindow-constructing test files stalls indefinitely (near-zero CPU, thread state Wait/UserRequest — genuinely blocked, not slow). Running the file alone with a hard timeout reproduces it reliably (timeout 60 pytest tests/test_main_window_batch_launcher.py -v never completes).

Investigated and ruled out:

  • The two already-mitigated delayed dialogs in MainWindow.__init__ (_check_startup_status's diarization wizard at 500ms, _maybe_offer_start_menu_shortcut at 1500ms) — both guarded by the existing _isolate_config autouse fixture in tests/conftest.py (pre-seeds hf_token and start_menu_offer_done).
  • The third, unguarded delayed dialog (_show_system_status's SystemStatusDialog at 300ms, gated on DependencyChecker.run_all_checks() reporting a critical failure) — confirmed via direct invocation against the exact isolated test config that it reports zero critical failures on this machine, so it doesn't fire here.

The actual trigger is still unidentified. conftest.py's own docstring describes exactly this class of bug for the two mitigated timers ("once enough real wall-clock time elapses later in the suite, some other test's app.processEvents() call delivers it — and a Qt modal has no way to be dismissed under the offscreen platform, so the run hangs") — strongly suggests a fourth, not-yet-identified delayed QTimer.singleShot/blocking .exec() somewhere in the MainWindow or batch-launcher construction path that isn't covered by the existing mitigation.

Next step: bisect which specific test combination triggers it (reproduced with test_main_window_activity_widget.py + test_main_window_com_poller_lifecycle.py + test_main_window_status_refresh.py run together, but the stall point moved between runs — consistent with a cumulative wall-clock-delay trigger rather than a fixed line), then find the offending delayed call and add it to the conftest mitigation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions