diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-19 11:50:18 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-19 11:50:18 +0000 |
commit | bf6300e0a1cee545d2b8579f9280fbe6c5283b83 (patch) | |
tree | e0a47550d163615efbd1fcda783ef4fb792838ca /tests | |
parent | Merge tag 'v1.2.0rc1' into develop (diff) | |
parent | Fix stack overflow in Keyring (#5724) (diff) | |
download | synapse-bf6300e0a1cee545d2b8579f9280fbe6c5283b83.tar.xz |
Fix stack overflow in Keyring (#5724)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/crypto/test_keyring.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/crypto/test_keyring.py b/tests/crypto/test_keyring.py index 795703967d..8d94a503d6 100644 --- a/tests/crypto/test_keyring.py +++ b/tests/crypto/test_keyring.py @@ -86,35 +86,6 @@ class KeyringTestCase(unittest.HomeserverTestCase): getattr(LoggingContext.current_context(), "request", None), expected ) - def test_wait_for_previous_lookups(self): - kr = keyring.Keyring(self.hs) - - lookup_1_deferred = defer.Deferred() - lookup_2_deferred = defer.Deferred() - - # we run the lookup in a logcontext so that the patched inlineCallbacks can check - # it is doing the right thing with logcontexts. - wait_1_deferred = run_in_context( - kr.wait_for_previous_lookups, {"server1": lookup_1_deferred} - ) - - # there were no previous lookups, so the deferred should be ready - self.successResultOf(wait_1_deferred) - - # set off another wait. It should block because the first lookup - # hasn't yet completed. - wait_2_deferred = run_in_context( - kr.wait_for_previous_lookups, {"server1": lookup_2_deferred} - ) - - self.assertFalse(wait_2_deferred.called) - - # let the first lookup complete (in the sentinel context) - lookup_1_deferred.callback(None) - - # now the second wait should complete. - self.successResultOf(wait_2_deferred) - def test_verify_json_objects_for_server_awaits_previous_requests(self): key1 = signedjson.key.generate_signing_key(1) |