mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-07-13 18:19:47 -04:00
Give more time for bob to dial Alice in CI
This commit is contained in:
parent
07e1456b56
commit
70bf0f59f6
2 changed files with 11 additions and 1 deletions
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…
Add table
Add a link
Reference in a new issue