Skip to content

Commit 04c21ba

Browse files
committed
test: remove flakiness in wait_for_block_acceptance
We can't wait for all signatures, because if a signer sees the global acceptance before sending its signature, it will not send it.
1 parent 1964463 commit 04c21ba

File tree

1 file changed

+2
-2
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+2
-2
lines changed

testnet/stacks-node/src/tests/signer/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ impl<S: Signer<T> + Send + 'static, T: SignerEventTrait + 'static> SignerTest<Sp
557557
signer_signature_hash: &Sha512Trunc256Sum,
558558
expected_signers: &[StacksPublicKey],
559559
) -> Result<(), String> {
560-
// Make sure that ALL signers accepted the block proposal
560+
// Make sure that at least 70% of signers accepted the block proposal
561561
wait_for(timeout_secs, || {
562562
let signatures = test_observer::get_stackerdb_chunks()
563563
.into_iter()
@@ -585,7 +585,7 @@ impl<S: Signer<T> + Send + 'static, T: SignerEventTrait + 'static> SignerTest<Sp
585585
}
586586
})
587587
.collect::<HashSet<_>>();
588-
Ok(signatures.len() == expected_signers.len())
588+
Ok(signatures.len() > expected_signers.len() * 7 / 10)
589589
})
590590
}
591591

0 commit comments

Comments
 (0)