Skip to content

Commit 353d18b

Browse files
committed
fix(ci,test): update chained_mempool_txs to use 6 secs timeout
- update the chained_mempool_txs test to use 6 seconds as timeout, instead of 5, it was the only spot using 5 instead of 6. - update the error message to show the total time elapsed, can help debug the CI if the timeout error persists.
1 parent 00efcde commit 353d18b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

crates/electrum/tests/test_electrum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pub fn chained_mempool_tx_sync() -> anyhow::Result<()> {
240240
.transaction()?;
241241
let txid2 = rpc_client.send_raw_transaction(signed_tx.raw_hex())?;
242242

243-
env.wait_until_electrum_sees_txid(signed_tx.compute_txid(), Duration::from_secs(5))?;
243+
env.wait_until_electrum_sees_txid(signed_tx.compute_txid(), Duration::from_secs(6))?;
244244

245245
let spk_history = electrum_client.script_get_history(&tracked_addr.script_pubkey())?;
246246
assert!(

crates/testenv/src/lib.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,10 @@ impl TestEnv {
206206
std::thread::sleep(delay);
207207
}
208208

209-
Err(anyhow::Error::msg(
210-
"Timed out waiting for Electrsd to get block header",
211-
))
209+
Err(anyhow::Error::msg(format!(
210+
"Timed out waiting for Electrsd to get transaction, took: {:?}",
211+
start.elapsed()
212+
)))
212213
}
213214

214215
/// This method waits for Electrsd to see a transaction with given `txid`. `timeout` is the
@@ -229,9 +230,10 @@ impl TestEnv {
229230
std::thread::sleep(delay);
230231
}
231232

232-
Err(anyhow::Error::msg(
233-
"Timed out waiting for Electrsd to get transaction",
234-
))
233+
Err(anyhow::Error::msg(format!(
234+
"Timed out waiting for Electrsd to get transaction, took: {:?}",
235+
start.elapsed()
236+
)))
235237
}
236238

237239
/// Invalidate a number of blocks of a given size `count`.

0 commit comments

Comments
 (0)