Skip to content

Commit d433239

Browse files
author
MarcoFalke
committed
Merge #14456: test: forward timeouts properly in send_blocks_and_test
94e21c1 test: forward timeouts properly in send_blocks_and_test (James O'Beirne) Pull request description: Small change motivated by frustrations while writing `feature_block` tests; when a timeout is passed to `send_blocks_and_test` it isn't forwarded onto constituent waiting calls - you can end up waiting 60 seconds when you articulated e.g. 5. Respect the given timeout all the way down. Tree-SHA512: 3a964764fc5e3431ae3b17bd642a27a1bd4526541a799ef63696c9dab0289a005a13d645770be6e46ea262d22a58f79d2b407293a39397b036f616fe20c21241
2 parents 544f323 + 94e21c1 commit d433239

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/functional/test_framework/mininode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,9 @@ def send_blocks_and_test(self, blocks, node, *, success=True, request_block=True
500500
wait_until(lambda: blocks[-1].sha256 in self.getdata_requests, timeout=timeout, lock=mininode_lock)
501501

502502
if expect_disconnect:
503-
self.wait_for_disconnect()
503+
self.wait_for_disconnect(timeout=timeout)
504504
else:
505-
self.sync_with_ping()
505+
self.sync_with_ping(timeout=timeout)
506506

507507
if success:
508508
wait_until(lambda: node.getbestblockhash() == blocks[-1].hash, timeout=timeout)

0 commit comments

Comments
 (0)