Fix system.generate_send_new intermittent failures (#2742)
This is likely due to wallet rep counts not updating quick enough on CI due to online weight fluctuating very heavily in this test, causing votes to not be generated. Waiting for the online weight to stabilize by waiting on a voting rep should fix it. Ran CI twice and didn't trigger whereas it would trigger often without this change.
This commit is contained in:
parent
91aafd27e7
commit
7966efd652
1 changed files with 2 additions and 0 deletions
|
|
@ -597,6 +597,8 @@ TEST (system, generate_send_new)
|
|||
ASSERT_GT (node1.balance (stake_preserver.pub), node1.balance (nano::genesis_account));
|
||||
std::vector<nano::account> accounts;
|
||||
accounts.push_back (nano::test_genesis_key.pub);
|
||||
// This indirectly waits for online weight to stabilize, required to prevent intermittent failures
|
||||
ASSERT_TIMELY (5s, node1.wallets.rep_counts ().voting > 0);
|
||||
system.generate_send_new (node1, accounts);
|
||||
nano::account new_account (0);
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue