Skip to content

test: use sleepy wait-for-log in reindex readonly#30006

Merged
achow101 merged 1 commit into
bitcoin:masterfrom
pinheadmz:sleepy-wait
May 9, 2024
Merged

test: use sleepy wait-for-log in reindex readonly#30006
achow101 merged 1 commit into
bitcoin:masterfrom
pinheadmz:sleepy-wait

Conversation

@pinheadmz

Copy link
Copy Markdown
Member

Also rename the busy wait-for-log method to prevent recurrence. See #27039 (comment)

@DrahtBot

DrahtBot commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

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, tdb3, rkrux, achow101

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #28121 (include verbose "debug-message" field in testmempoolaccept response by pinheadmz)

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.

@DrahtBot DrahtBot added the Tests label Apr 30, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with self.nodes[0].assert_debug_log(["Reindexing finished"]):
with self.nodes[0].assert_debug_log(["Reindexing finished"], timeout=30):

I think the timeout needs to be preserved?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, the default timeout in wait_for_debug_log() now busy_wait_for_debug_log() is 60 unless im mistaken?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, any value works. But 2 seconds may be a bit on the risky side.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks

@maflcko

maflcko commented Apr 30, 2024

Copy link
Copy Markdown
Member

Thanks. lgtm ACK 453c871184e0d62111028d25ec327cc7dd2f0099, after fixed-up timeout value.

Also rename the busy wait-for-log method to prevent recurrence
@maflcko

maflcko commented Apr 30, 2024

Copy link
Copy Markdown
Member

utACK fd6a7d3

@tdb3 tdb3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK for fd6a7d3

Thank you. This should make test execution slightly more efficient and every little bit helps with many tests running in parallel (with test_runner).

Built and ran all functional tests (all passed). Reviewed code changes, but didn't notice anything besides what is already covered in @maflcko's comments.

@rkrux rkrux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fd6a7d3

Make and tests successful.
I found this answer helpful that explains how yield and with interact with each other: https://stackoverflow.com/a/35489897/12218815

@achow101

achow101 commented May 9, 2024

Copy link
Copy Markdown
Member

ACK fd6a7d3

@achow101 achow101 merged commit 98dd4e7 into bitcoin:master May 9, 2024
@bitcoin bitcoin locked and limited conversation to collaborators May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants