Skip to content

Commit 24654a5

Browse files
committed
Merge #2054: fix(ci,test): update chained_mempool_txs to use 6 secs timeout
353d18b fix(ci,test): update `chained_mempool_txs` to use 6 secs timeout (Leonardo Lima) Pull request description: fixes #2045 ### Description It's an initial attempt to solve the timeout failures we have been facing on CI when running electrum tests. It it's not solved at all, at least it now adds the total time elapsed so we can know how long it's taking in CI. The PR updates the `chained_mempool_txs` test to use 6 seconds as timeout, instead of 5, it was the only spot using 5 instead of 6. Also updates the error message to show the total time elapsed, can help debug the CI if the timeout error persists. ### Notes to the reviewers ### Changelog notice ``` ### Changed - Update the `chained_mempool_txs` to use 6 seconds as timeout. - Update the error message to show the time elapsed. ``` ### Checklists #### All Submissions: * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) ACKs for top commit: evanlinjin: ACK 353d18b Tree-SHA512: 62edc397ca74dd8b3a90eb300ea8d52772b3089698d8dad481bf2f9e4ef394ab2a826abdfa7f5d177e675a03bb83ac56445273dbc1d35885ff78651ec9bfc5aa
2 parents 00efcde + 353d18b commit 24654a5

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)