diff --git a/rust/sealevel/programs/mailbox-test/src/functional.rs b/rust/sealevel/programs/mailbox-test/src/functional.rs index 3c4ace00ea..0870ef2fa4 100644 --- a/rust/sealevel/programs/mailbox-test/src/functional.rs +++ b/rust/sealevel/programs/mailbox-test/src/functional.rs @@ -1,3 +1,5 @@ +use std::thread::sleep; + use borsh::BorshDeserialize; use hyperlane_core::{ accumulator::incremental::IncrementalMerkle as MerkleTree, HyperlaneMessage, H256, @@ -976,6 +978,10 @@ async fn test_process_errors_if_message_already_processed() { .await .unwrap(); + // there's a race condition that isn't fixed by setting `CommitmentLevel::Confirmed` + // just wait a bit to ensure the message is processed + sleep(std::time::Duration::from_secs(1)); + let result = process( &mut banks_client, &payer,