Skip to content

Commit 6399d24

Browse files
authored
Merge pull request #11 from sbellem/test-outputs-from-ba
Test the decided values of the honest nodes in BA
2 parents 6ccea7f + 8f8eb7a commit 6399d24

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/test_binaryagreement.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ def test_binaryagreement_dummy_with_redundant_messages(byznode, msg_type):
169169
for i in range(N):
170170
inputs[i].put(random.randint(0,1))
171171

172-
with raises(gevent.hub.LoopExit) as err:
173-
outs = [outputs[i].get() for i in range(N)]
172+
outs = [outputs[i].get() for i in range(N) if i != byznode]
173+
assert all(v in (0, 1) and v == outs[0] for v in outs)
174174

175175
try:
176176
gevent.joinall(threads)
@@ -203,8 +203,9 @@ def test_binaryagreement_dummy_with_byz_message_type(byznode):
203203
for i in range(N):
204204
inputs[i].put(random.randint(0,1))
205205

206-
with raises(gevent.hub.LoopExit) as err:
207-
outs = [outputs[i].get() for i in range(N)]
206+
outs = [outputs[i].get() for i in range(N) if i != byznode]
207+
assert all(v in (0, 1) and v == outs[0] for v in outs)
208+
208209
try:
209210
gevent.joinall(threads)
210211
except gevent.hub.LoopExit:

0 commit comments

Comments
 (0)