From a4d07256d6231802972e79a8e9ea7b804a1cd77e Mon Sep 17 00:00:00 2001 From: Youngjoon Lee Date: Wed, 7 Jun 2023 17:04:30 +0900 Subject: [PATCH] test: make the committed_blocks test more strict (#31) --- carnot/test_unhappy_path.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/carnot/test_unhappy_path.py b/carnot/test_unhappy_path.py index f2f37d7..fa20799 100644 --- a/carnot/test_unhappy_path.py +++ b/carnot/test_unhappy_path.py @@ -259,7 +259,6 @@ class TestCarnotUnhappyPath(TestCase): root_votes = succeed(self, overlay, nodes, proposed_block) proposed_block = leader.propose_block(view, root_votes).payload - committed_blocks = [view for view in range(1, 11) if view not in (4, 5, 7, 8, 9, 10, 11, 12, 13)] + committed_blocks = {0, 1, 2, 3, 6, 9, 10, 11} for node in nodes.values(): - for view in committed_blocks: - self.assertIn(view, [block.view for block in node.committed_blocks().values()]) + self.assertEqual(committed_blocks, {block.view for block in node.committed_blocks().values()})