mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-04-20 07:56:05 -04:00
Give more time for bob to dial Alice in CI
This commit is contained in:
parent
07e1456b56
commit
70bf0f59f6
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -105,6 +105,7 @@ jobs:
|
||||
if: (!matrix.skip_tests)
|
||||
run: cargo test -j2 --workspace --all-features
|
||||
env:
|
||||
BOB_TIME_TO_ACT_MIN_TEST: 30
|
||||
MONERO_ADDITIONAL_SLEEP_PERIOD: 60000
|
||||
RUST_MIN_STACK: 16777216 # 16 MB. Default is 8MB. This is fine as in tests we start 2 programs: Alice and Bob.
|
||||
|
||||
|
@ -94,10 +94,19 @@ mod testnet {
|
||||
|
||||
mod regtest {
|
||||
use super::*;
|
||||
use std::{env, str::FromStr};
|
||||
|
||||
// In test, we set a shorter time to fail fast but not so short that it makes
|
||||
// the test fail
|
||||
pub static BOB_TIME_TO_ACT: Lazy<Duration> = Lazy::new(|| Duration::from_secs(10 * 60));
|
||||
pub static BOB_TIME_TO_ACT: Lazy<Duration> = Lazy::new(|| {
|
||||
let min = match env::var("BOB_TIME_TO_ACT_MIN_TEST") {
|
||||
Ok(min) => u64::from_str(&min)
|
||||
.expect("env BOB_TIME_TO_ACT_MIN_TEST must be an unsigned integer"),
|
||||
Err(_) => 1,
|
||||
};
|
||||
|
||||
Duration::from_secs(min * 60)
|
||||
});
|
||||
|
||||
pub static BITCOIN_FINALITY_CONFIRMATIONS: u32 = 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user