Fix tests quorum_minimum_confirm_fail, quorum_minimum_update_weight_before_quorum_checks

Those tests has an election scheduler activate and immediate access to
election active container without a flush or a wait in between.
This commit is contained in:
Dimitrios Siganos 2021-04-28 00:45:34 +01:00 committed by dsiganos
commit ebc851b1d2

View file

@ -165,6 +165,7 @@ TEST (election, quorum_minimum_confirm_fail)
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 ());
@ -235,6 +236,7 @@ TEST (election, quorum_minimum_update_weight_before_quorum_checks)
ASSERT_EQ (node2.ledger.cache.block_count, 4);
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 ());