diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-05-24 22:17:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-24 22:17:18 +0100 |
commit | fa1b293da2e0a5e47864ccb49e530d8a81d81790 (patch) | |
tree | 192ba8a0cb6eab2f6bbdd2eef78aafcbd91b5134 /tests/crypto | |
parent | Fix appservice timestamp massaging (#5233) (diff) | |
download | synapse-fa1b293da2e0a5e47864ccb49e530d8a81d81790.tar.xz |
Simplification to Keyring.wait_for_previous_lookups. (#5250)
The list of server names was redundant, since it was equivalent to the keys on the server_to_deferred map. This reduces the number of large lists being passed around, and has the benefit of deduplicating the entries in `wait_on`.
Diffstat (limited to 'tests/crypto')
-rw-r--r-- | tests/crypto/test_keyring.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/crypto/test_keyring.py b/tests/crypto/test_keyring.py index de61bad15d..4fba462d44 100644 --- a/tests/crypto/test_keyring.py +++ b/tests/crypto/test_keyring.py @@ -85,7 +85,7 @@ class KeyringTestCase(unittest.HomeserverTestCase): # 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"], {"server1": lookup_1_deferred} + kr.wait_for_previous_lookups, {"server1": lookup_1_deferred} ) # there were no previous lookups, so the deferred should be ready @@ -94,7 +94,7 @@ class KeyringTestCase(unittest.HomeserverTestCase): # 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"], {"server1": lookup_2_deferred} + kr.wait_for_previous_lookups, {"server1": lookup_2_deferred} ) self.assertFalse(wait_2_deferred.called) |