test: Fail wait_until early if connection is lost#19489
Merged
maflcko merged 1 commit intobitcoin:masterfrom Aug 4, 2020
Merged
test: Fail wait_until early if connection is lost#19489maflcko merged 1 commit intobitcoin:masterfrom
maflcko merged 1 commit intobitcoin:masterfrom
Conversation
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
faf10c7 to
faa9a74
Compare
Member
Author
|
cc @jnewbery Mind taking a look here? 🙏 |
jnewbery
reviewed
Aug 3, 2020
| return self.message_count["verack"] | ||
|
|
||
| self.wait_until(test_function, timeout=timeout) | ||
| self.wait_until(test_function, timeout=timeout, check_connected=False) |
Contributor
There was a problem hiding this comment.
I think this could be improved even more by making add_p2p_connection() wait until is_connected is True before returning. That way you could leave check_connected as True for wait_for_verack() as well as in p2p_filter.py
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Aug 4, 2020
faa9a74 test: Fail wait_until early if connection is lost (MarcoFalke) Pull request description: 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. ACKs for top commit: jnewbery: Code review ACK faa9a74. Tree-SHA512: 4be850b96e23b87bc2ff42c028a5045d6f5cdbc9482ce6a6ba01cc5eb26710dab9e2ed547c363aac4bd5825151ee9996fb797261420b631bceeddbfa698d1dec
deadalnix
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
May 13, 2021
Summary: faa9a74c9e99eb43ba0d27fa906767ee88011aeb test: Fail wait_until early if connection is lost (MarcoFalke) Pull request description: 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. --- Depends on D9514 Backport of [[bitcoin/bitcoin#19489 | core#19489]] Test Plan: ninja all check check-functional Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D9515
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calling
minonode.wait_untilneeds 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 allwait_until, unless opted out.