Fix core test case election.quorum_minimum_confirm_success (#3242)
The test asks the scheduler to activate an election and then check to see the election is in the active election container. However, node.scheduler.activate() is not a blocking operation and the election activation happens in the background at an unspecified time. To solve this, the election scheduler can be flushed before checking the active election container.
This commit is contained in:
parent
9e04e156b5
commit
7672d4ed64
1 changed files with 1 additions and 0 deletions
|
@ -132,6 +132,7 @@ TEST (election, quorum_minimum_confirm_success)
|
|||
node1.process_active (send1);
|
||||
node1.block_processor.flush ();
|
||||
node1.scheduler.activate (nano::dev_genesis_key.pub, node1.store.tx_begin_read ());
|
||||
node1.scheduler.flush ();
|
||||
auto election = node1.active.election (send1->qualified_root ());
|
||||
ASSERT_NE (nullptr, election);
|
||||
ASSERT_EQ (1, election->blocks ().size ());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue