fix: report hidden worker admission failures without frozen error dialogs

This commit is contained in:
阿白叔 committed 2026-11-17 03:02:43 +08:00
1 parent f964ff347c
commit 8bfa4eed34
5 files changed
+160 -21

No files matched your search

+1 -1
View File
@@ -273,7 +273,7 @@ def test_unbound_admission_refusal_cannot_claim_release(tmp_path, monkeypatch):
job = tmp_path/'request.json'
job.write_text(json.dumps(dict(library=str(tmp_path/'lib.lmc'), block='A', operation_id='foreign',
session_record_path=str(tmp_path/'session.json'), project=str(tmp_path/'A.prj'))))
monkeypatch.setattr(desktop_worker, 'run_native_worker', lambda *a: (_ for _ in ()).throw(RuntimeError('refused')))
monkeypatch.setattr(desktop_worker, 'run_native_worker', lambda *a, admission_state=None: (_ for _ in ()).throw(RuntimeError('refused')))
assert native.run_native_backup_worker(job) == 1
result = json.loads(job.with_name('result.json').read_text('utf-8'))
assert result['safe_to_continue'] is False