]> Untitled Git - bdk/commitdiff
fix(ci,test): update `chained_mempool_txs` to use 6 secs timeout
authorLeonardo Lima <oleonardolima@users.noreply.github.com>
Thu, 2 Oct 2025 04:18:47 +0000 (14:18 +1000)
committerLeonardo Lima <oleonardolima@users.noreply.github.com>
Thu, 2 Oct 2025 04:18:47 +0000 (14:18 +1000)
- 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.

crates/electrum/tests/test_electrum.rs
crates/testenv/src/lib.rs

index befeeb4cc71502919965d94824f3c6777faa5647..07979866e764856455bc15beb3a3026b1a4fb793 100644 (file)
@@ -240,7 +240,7 @@ pub fn chained_mempool_tx_sync() -> anyhow::Result<()> {
         .transaction()?;
     let txid2 = rpc_client.send_raw_transaction(signed_tx.raw_hex())?;
 
-    env.wait_until_electrum_sees_txid(signed_tx.compute_txid(), Duration::from_secs(5))?;
+    env.wait_until_electrum_sees_txid(signed_tx.compute_txid(), Duration::from_secs(6))?;
 
     let spk_history = electrum_client.script_get_history(&tracked_addr.script_pubkey())?;
     assert!(
index d569db12ef9aa58176e876654801b38b93ca7214..7572fbf4b8eaf247926a0dbb631413326756f7af 100644 (file)
@@ -206,9 +206,10 @@ impl TestEnv {
             std::thread::sleep(delay);
         }
 
-        Err(anyhow::Error::msg(
-            "Timed out waiting for Electrsd to get block header",
-        ))
+        Err(anyhow::Error::msg(format!(
+            "Timed out waiting for Electrsd to get transaction, took: {:?}",
+            start.elapsed()
+        )))
     }
 
     /// This method waits for Electrsd to see a transaction with given `txid`. `timeout` is the
@@ -229,9 +230,10 @@ impl TestEnv {
             std::thread::sleep(delay);
         }
 
-        Err(anyhow::Error::msg(
-            "Timed out waiting for Electrsd to get transaction",
-        ))
+        Err(anyhow::Error::msg(format!(
+            "Timed out waiting for Electrsd to get transaction, took: {:?}",
+            start.elapsed()
+        )))
     }
 
     /// Invalidate a number of blocks of a given size `count`.