fix: reconcile reused identities and protect every native dispatch

This commit is contained in:
阿白叔 committed 2026-11-06 16:21:08 +08:00
1 parent cb11624b68
commit d9a79b6535
8 files changed
+159 -13

No files matched your search

+15
View File
@@ -32,6 +32,21 @@ class FakeProjectIntegration:
return True
def test_cancel_during_allowed_getter_prevents_new_integration_call():
from threading import Event
stop = Event()
class Integration(FakeProjectIntegration):
@property
def IsForwardAnnotationAllowed(self):
stop.set()
return True
integration = Integration()
with pytest.raises(IntegrationError, match='VERIFY_CANCELLED'):
refresh_integration(integration, settle_seconds=0,
error_reader=lambda: 'VERIFY_CANCELLED' if stop.is_set() else '')
assert integration.forward_calls == 0
def test_database_restoration_dialog_requires_manual_recovery():
action = choose_dialog_action(
'Database Restoration',