From a5f74d86c82d3d39b9589ef9c14c57e2b071bc96 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Wed, 1 Sep 2021 15:58:56 -0500 Subject: [PATCH] make test pass with 1 bin to remove noisy failure during testing (#19554) --- runtime/src/accounts_db.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 0bb56e2b9a..1db02c1c93 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -12443,14 +12443,15 @@ pub mod tests { ]; // make sure accounts are in 2 different bins assert!( - accounts - .accounts_index - .bin_calculator - .bin_from_pubkey(&keys[0]) - != accounts + (accounts.accounts_index.bins() == 1) + ^ (accounts .accounts_index .bin_calculator - .bin_from_pubkey(&keys[1]) + .bin_from_pubkey(&keys[0]) + != accounts + .accounts_index + .bin_calculator + .bin_from_pubkey(&keys[1])) ); let account = AccountSharedData::new(1, 1, AccountSharedData::default().owner()); let account_big = AccountSharedData::new(1, 1000, AccountSharedData::default().owner());