Commit eb2c3634 authored by Jérome Perrin's avatar Jérome Perrin

ProcessingNodeTestCase: Adjust _p_resolveConflict for more than 2 nodes

Usually we run tests with two nodes, so when there's a conflict it's
always between the "main" node and the processing node, so we always
have a distributing node during conflict.

But when running with, for example, 2 nodes (the main node + 2 nodes),
the conflict might occur between the two processing nodes and after
the resolution we still don't have a distributing node.
parent 80b089d2
......@@ -108,6 +108,8 @@ def Application_resolveConflict(self, old_state, saved_state, new_state):
saved_state.pop('test_distributing_node', ''),
new_state.pop('test_distributing_node', '')}
test_distributing_node_set.discard('')
new_state['test_distributing_node'] = ''
if test_distributing_node_set:
if len(test_distributing_node_set) != 1:
raise ConflictError
new_state['test_distributing_node'] = test_distributing_node_set.pop()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment