fix: reconcile reused identities and protect every native dispatch
This commit is contained in:
1 parent
cb11624b68
commit
d9a79b6535
8 files changed
+159
-13
No files matched your search
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user