Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix intermittent error in rpc_net.py (#29030) #29041

Conversation

theStack
Copy link
Contributor

@theStack theStack commented Dec 9, 2023

Asserting for the debug log message "Added connection peer=" is insufficient for ensuring that this new connection will show up in a following getpeerinfo() call, as the debug message is written in the CNode ctor, which means it hasn't necessarily been added to CConnman.m_nodes at this point.

Solve this by using the recently introduced wait_for_new_peer helper (see #29006, commit 00e0658), which is more robust.

Fixes #29030.

Asserting for the debug log message "Added connection peer=" is
insufficient for ensuring that this new connection will show up in a
following getpeerinfo() call, as the debug message is written in the
CNode ctor, which means it hasn't necessarily been added to
CConnman.m_nodes at this point.

Solve this by using the recently introduced `wait_for_new_peer`
helper, which is more robust.

Fixes bitcoin#29030.
@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 9, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Dec 9, 2023
@maflcko
Copy link
Member

maflcko commented Dec 9, 2023

lgtm ACK ea00f98

@fanquake fanquake merged commit 36fabb0 into bitcoin:master Dec 11, 2023
16 checks passed
@theStack theStack deleted the 202312-test-fix_intermittent_error_in_rpc_net branch December 11, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: Intermittent issue in rpc_net.py
4 participants