Fix for active_transactions.pessimistic_elections unit test (#3328)

This assert was sometimes failing:
ASSERT_TIMELY (10s, node.active.active (send->qualified_root ()));

We think the original intention was to check "send2" and not "send".
send2 should become active for an election after its parent gets confirmed.
This commit is contained in:
dsiganos 2021-06-15 09:52:58 +01:00 committed by GitHub
commit e286a64781
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1261,7 +1261,7 @@ TEST (active_transactions, pessimistic_elections)
} }
// Activation of cemented frontier successor should get started after the first pessimistic block is confirmed // Activation of cemented frontier successor should get started after the first pessimistic block is confirmed
ASSERT_TIMELY (10s, node.active.active (send->qualified_root ())); ASSERT_TIMELY (10s, node.active.active (send2->qualified_root ()));
node.active.confirm_expired_frontiers_pessimistically (node.store.tx_begin_read (), 100, election_count); node.active.confirm_expired_frontiers_pessimistically (node.store.tx_begin_read (), 100, election_count);
ASSERT_EQ (1, election_count); ASSERT_EQ (1, election_count);