mirror of
https://github.com/vacp2p/status-rln-prover.git
synced 2026-01-08 21:18:05 -05:00
chore: add constant for the timeout number
This commit is contained in:
@@ -32,6 +32,9 @@ mod proof_service_tests {
|
||||
const TX_HASH_1: [u8; 32] = [0x011; 32];
|
||||
const TX_HASH_1_2: [u8; 32] = [0x12; 32];
|
||||
|
||||
// Set to 10 seconds as 5 seconds can cause failures on Mac M1 machines.
|
||||
const PROOF_VERIFY_TEST_TIMEOUT: u64 = 10;
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
enum AppErrorExt {
|
||||
#[error("AppError: {0}")]
|
||||
@@ -88,7 +91,7 @@ mod proof_service_tests {
|
||||
debug!("Starting broadcast receiver...");
|
||||
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
|
||||
let res = tokio::time::timeout(
|
||||
std::time::Duration::from_secs(10),
|
||||
std::time::Duration::from_secs(PROOF_VERIFY_TEST_TIMEOUT),
|
||||
broadcast_receiver.recv(),
|
||||
)
|
||||
.await
|
||||
@@ -193,7 +196,7 @@ mod proof_service_tests {
|
||||
|
||||
loop {
|
||||
let res = tokio::time::timeout(
|
||||
std::time::Duration::from_secs(10),
|
||||
std::time::Duration::from_secs(PROOF_VERIFY_TEST_TIMEOUT),
|
||||
broadcast_receiver.recv(),
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user