|
9 | 9 | from test_framework.messages import uint256_to_string
|
10 | 10 | from test_framework.test_framework import DashTestFramework
|
11 | 11 | from test_framework.governance import have_trigger_for_height, prepare_object
|
12 |
| -from test_framework.util import assert_equal, satoshi_round |
| 12 | +from test_framework.util import assert_equal, assert_greater_than, satoshi_round |
13 | 13 |
|
14 | 14 | GOVERNANCE_UPDATE_MIN = 60 * 60 # src/governance/object.h
|
15 | 15 |
|
@@ -280,8 +280,11 @@ def sync_gov(node):
|
280 | 280 | self.wait_until(lambda: self.nodes[0].gobject("list", "valid", "triggers")[winning_trigger_hash]['NoCount'] == 1, timeout=5)
|
281 | 281 | self.wait_until(lambda: self.nodes[0].gobject("list", "valid", "triggers")[isolated_trigger_hash]['NoCount'] == self.mn_count - 1, timeout=5)
|
282 | 282 | self.log.info("Should wait until all 24 votes are counted for success on next stages")
|
283 |
| - self.wait_until(lambda: self.nodes[1].gobject("count")["votes"] == 24, timeout=5) |
284 |
| - |
| 283 | + # TODO: figure out where 25th vote come from |
| 284 | + # it is supposed to be only 24 of them, but in rare case there's 25 votes |
| 285 | + # and it's add instability to this functional tests |
| 286 | + self.wait_until(lambda: self.nodes[1].gobject("count")["votes"] >= 24, timeout=5) |
| 287 | + assert_greater_than(25, self.nodes[1].gobject("count")["votes"]) |
285 | 288 | self.log.info("Remember vote count")
|
286 | 289 | before = self.nodes[1].gobject("count")["votes"]
|
287 | 290 |
|
|
0 commit comments