v0.32.1: a stuck Rabbit connection can no longer freeze the window

Opening Connections called find_device() on the GUI thread, which lists the
gvfs-MTP mount; on a wedged mount that blocks forever in an uninterruptible
FUSE wait and the app had to be force-quit. DeviceWatcher now probes on a
daemon thread (one at a time, STUCK after 3 s, late answers still land), the
menu reads its cached answer, and a stuck mount shows "Rabbit isn't
responding…" with a Reset Connection button (kill gvfsd-mtp, remount via
gio). Tests can no longer reach the real mount (conftest patches
find_device), which also takes the suite from ~200 s to ~22 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 00:58:26 -07:00
co-authored by Claude Opus 5.5
parent ba795e3c69
commit 27abdbdb63
6 changed files with 382 additions and 18 deletions
+9
View File
@@ -17,6 +17,15 @@ def _isolate_eventlog(tmp_path, monkeypatch):
lambda: tmp_path / "control-events.log")
@pytest.fixture(autouse=True)
def _no_real_device(monkeypatch):
"""No test may look at the real gvfs mount: a wedged gvfs-MTP mount
blocks the listing uninterruptibly and hangs the suite (Round 71).
Tests that need a device patch their own finder or pass a fake root."""
from lintunes import device_sync
monkeypatch.setattr(device_sync, "find_device", lambda: None)
@pytest.fixture(scope="session")
def qapp():
"""A Qt application so QObject/QTimer and real widgets work in tests.