mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 02:14:49 -04:00
Add a check to make sure that during state conflict res we only request a PDU we don't have.
This commit is contained in:
parent
1a26905cc9
commit
c5f2da5875
2 changed files with 13 additions and 2 deletions
|
@ -37,6 +37,7 @@ class StateTestCase(unittest.TestCase):
|
|||
"update_current_state",
|
||||
"get_latest_pdus_in_context",
|
||||
"get_current_state",
|
||||
"get_pdu",
|
||||
])
|
||||
self.replication = Mock(spec=["get_pdu"])
|
||||
|
||||
|
@ -220,6 +221,8 @@ class StateTestCase(unittest.TestCase):
|
|||
|
||||
self.replication.get_pdu.side_effect = set_return_tree
|
||||
|
||||
self.persistence.get_pdu.return_value = None
|
||||
|
||||
is_new = yield self.state.handle_new_state(new_pdu)
|
||||
|
||||
self.assertTrue(is_new)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue