test: use the Windows snapshot in catalog wait integration tests

This commit is contained in:
阿白叔 committed 2026-11-25 12:13:09 +08:00
1 parent b015827e97
commit a63861f0e2
1 file changed
+3 -3
+3 -3
View File
@@ -723,11 +723,11 @@ def test_external_catalog_owner_wait_retries_once_or_cancels(qtbot, tmp_path, mo
raise NativeOperationError('LIBRARY_MANAGER_BUSY: 已有 Library Manager 运行。', safe_to_continue=True)
return Catalog(path, 1, (CatalogEntry('A', 'Logical-Physical'),))
def owners(*args, **kwargs):
def owners(_name):
probing.set()
return [] if released.is_set() else [{'pid': 123}]
return [] if released.is_set() else [123]
monkeypatch.setattr('cbb_refresh_verify.owner_probe.query_owners', owners)
monkeypatch.setattr('cbb_refresh_verify.owner_probe.snapshot_process_ids', owners)
window = window_for(qtbot, tmp_path, monkeypatch,
reader=lambda _: LibraryReadResult((CbbRecord('A', 'LP'),), directory_count=1),
catalog_reader=read_catalog, status_refresher=lambda names, _: {name: 'READY' for name in names})