Commit message · merge-scriptMerge bitcoin/bitcoin#36862: test: use long timeout for event waits in interface_ipc_mining
74135e2e625030b18daf7539bd19dabb75948af1 test: use long timeout for event waits in interface_ipc_mining (ViniciusCestarii)
Pull request description:
Follow-up to #36791, https://github.com/bitcoin/bitcoin/pull/36791#discussion_r4565761925 by ryanofsky.
#36791 fixed the `waitTipChanged` timeout on slow hosts, but the `template6` `waitNext` call has the same race: it waits for an event the test triggers after a 0.1s sleep, with a 1s timeout.
This adds `long_ipc_timeout` and uses it for all waits that end on an event the test triggers.
To reproduce failure on master:
```diff
diff --git a/test/functional/interface_ipc_mining.py b/test/functional/interface_ipc_mining.py
index cdef196fd0..49e1c8a9c1 100755
--- a/test/functional/interface_ipc_mining.py
+++ b/test/functional/interface_ipc_mining.py
@@ -320,7 +320,8 @@ class IPCMiningTest(BitcoinTestFramework):
self.log.debug("Wait for another, get one after increase in fees in the mempool")
template6 = await wait_and_do(
mining_wait_next_template(template5, stack, ctx, waitoptions),
- lambda: self.miniwallet.send_self_transfer(fee_rate=10, from_node=self.nodes[0]))
+ lambda: self.miniwallet.send_self_transfer(fee_rate=10, from_node=self.nodes[0]),
+ sleep_time=1.2)
assert template6 is not None
block4 = await mining_get_block(template6, ctx)
assert_equal(len(block4.vtx), 3)
```
ACKs for top commit:
nervana21:
tACK 74135e2e625030b18daf7539bd19dabb75948af1
ryanofsky:
Tested ACK 74135e2e625030b18daf7539bd19dabb75948af1. This finishes the fix from #36791: every wait that returns on an event the test triggers now has at least a minute, so none of them can time out on a slow host with the default timeout factor. I checked that the test passes normally, with the faketime command from #36791, and with `sleep_time=1.2` on the `template6` wait, which failed before.
w0xlt:
ACK 74135e2e625030b18daf7539bd19dabb75948af1
Tree-SHA512: f1648296f955a4be375ee9c6cf514df546559bdf50a6e05d7dd8f42d771da44ef3439e6cde3e10f348f6126dea9d8ac7b3264b692c56eb630583e4c416de42dc
91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queuedmerge-commit duplicate discount