Calling minonode.wait_until needs a connection to make progress (e.g. waiting for an inv), unless the mininode waits for the initial connection or for a disconnection. So for test development and failure debugging, fail early in all wait_until, unless opted out.
test: Fail wait_until early if connection is lost #19489
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2007-testFailEarly changing 3 files +27 −29-
MarcoFalke commented at 8:41 AM on July 11, 2020: member
- fanquake added the label Tests on Jul 11, 2020
-
DrahtBot commented at 10:35 AM on July 11, 2020: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #19134 (test: Replace global wait_until with BitcoinTestFramework.wait_until and mininode.wait_until by dboures)
- #18838 (test: Check header hash in wait_for_getheaders by Nishikoh)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
test: Fail wait_until early if connection is lost faa9a74c9e
- MarcoFalke force-pushed on Jul 14, 2020
-
MarcoFalke commented at 7:03 PM on July 30, 2020: member
cc @jnewbery Mind taking a look here? :pray:
-
in test/functional/test_framework/mininode.py:467 in faa9a74c9e
463 | @@ -468,7 +464,7 @@ def wait_for_verack(self, timeout=60): 464 | def test_function(): 465 | return self.message_count["verack"] 466 | 467 | - self.wait_until(test_function, timeout=timeout) 468 | + self.wait_until(test_function, timeout=timeout, check_connected=False)
jnewbery commented at 12:41 PM on August 3, 2020:I think this could be improved even more by making
add_p2p_connection()wait untilis_connectedis True before returning. That way you could leavecheck_connectedas True forwait_for_verack()as well as in p2p_filter.pyjnewbery commented at 12:41 PM on August 3, 2020: memberCode review ACK faa9a74c9e99eb43ba0d27fa906767ee88011aeb.
One suggestion inline. Feel free to take or ignore.
MarcoFalke merged this on Aug 4, 2020MarcoFalke closed this on Aug 4, 2020MarcoFalke deleted the branch on Aug 4, 2020sidhujag referenced this in commit 476656a97d on Aug 4, 2020deadalnix referenced this in commit 9ae1d72c46 on May 13, 2021DrahtBot locked this on Feb 15, 2022ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 18:14 UTC
More mirrored repositories can be found on mirror.b10c.me