From 6a3746c9f6ca4edec8e9ce66efdbf074e87f5615 Mon Sep 17 00:00:00 2001 From: Aaron Blankstein Date: Thu, 26 Sep 2024 15:13:22 -0500 Subject: [PATCH] fix test assertion --- testnet/stacks-node/src/tests/signer/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testnet/stacks-node/src/tests/signer/mod.rs b/testnet/stacks-node/src/tests/signer/mod.rs index 9bf79f9ce7..551fc3faa0 100644 --- a/testnet/stacks-node/src/tests/signer/mod.rs +++ b/testnet/stacks-node/src/tests/signer/mod.rs @@ -727,7 +727,7 @@ impl + Send + 'static, T: SignerEventTrait + 'static> SignerTest Result<(), String> { wait_for(timeout_secs, || { let stackerdb_events = test_observer::get_stackerdb_chunks(); - let block_rejections = stackerdb_events + let block_rejections: HashSet<_> = stackerdb_events .into_iter() .flat_map(|chunk| chunk.modified_slots) .filter_map(|chunk| { @@ -739,7 +739,7 @@ impl + Send + 'static, T: SignerEventTrait + 'static> SignerTest + Send + 'static, T: SignerEventTrait + 'static> SignerTest None, } }) - .collect::>(); - Ok(block_rejections.len() == expected_signers.len()) + .collect(); + info!("Checking block rejections"; "rejected_len" => block_rejections.len(), "expected_len" => expected_signers.len()); + Ok(block_rejections.len() >= expected_signers.len()) }) } }