diff --git a/tests/processor/src/lib.rs b/tests/processor/src/lib.rs index fa917ddc..a318851e 100644 --- a/tests/processor/src/lib.rs +++ b/tests/processor/src/lib.rs @@ -233,7 +233,7 @@ impl Coordinator { /// Receive a message from a processor as its coordinator. pub async fn recv_message(&mut self) -> ProcessorMessage { let msg = tokio::time::timeout( - core::time::Duration::from_secs(10), + core::time::Duration::from_secs(20), self.queue.next(Service::Processor(self.network)), ) .await diff --git a/tests/processor/src/tests/batch.rs b/tests/processor/src/tests/batch.rs index 419738db..38aaca61 100644 --- a/tests/processor/src/tests/batch.rs +++ b/tests/processor/src/tests/batch.rs @@ -217,11 +217,12 @@ fn batch_test() { let key_pair = key_gen(&mut coordinators, network).await; // Now we we have to mine blocks to activate the key - // (the first key is activated when the coin's block time exceeds the Serai time it was - // confirmed at) - - for _ in 0 .. confirmations(network) { + // (the first key is activated when the network's time as of a block exceeds the Serai time + // it was confirmed at) + // Mine multiple sets of medians to ensure the median is sufficiently advanced + for _ in 0 .. (10 * confirmations(network)) { coordinators[0].add_block(&ops).await; + tokio::time::sleep(Duration::from_secs(1)).await; } coordinators[0].sync(&ops, &coordinators[1 ..]).await; diff --git a/tests/processor/src/tests/send.rs b/tests/processor/src/tests/send.rs index 86918062..227cc0c5 100644 --- a/tests/processor/src/tests/send.rs +++ b/tests/processor/src/tests/send.rs @@ -161,11 +161,12 @@ fn send_test() { let key_pair = key_gen(&mut coordinators, network).await; // Now we we have to mine blocks to activate the key - // (the first key is activated when the network's block time exceeds the Serai time it was - // confirmed at) - - for _ in 0 .. confirmations(network) { + // (the first key is activated when the network's time as of a block exceeds the Serai time + // it was confirmed at) + // Mine multiple sets of medians to ensure the median is sufficiently advanced + for _ in 0 .. (10 * confirmations(network)) { coordinators[0].add_block(&ops).await; + tokio::time::sleep(Duration::from_secs(1)).await; } coordinators[0].sync(&ops, &coordinators[1 ..]).await;