-
Notifications
You must be signed in to change notification settings - Fork 35.7k
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: use sleepy wait-for-log in reindex readonly #30006
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. 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. |
@@ -75,7 +75,7 @@ def reindex_readonly(self): | |||
|
|||
if undo_immutable: | |||
self.log.debug("Attempt to restart and reindex the node with the unwritable block file") | |||
with self.nodes[0].wait_for_debug_log([b"Reindexing finished"]): | |||
with self.nodes[0].assert_debug_log(["Reindexing finished"]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks
Thanks. lgtm ACK 453c871, after fixed-up timeout value. |
Also rename the busy wait-for-log method to prevent recurrence
utACK fd6a7d3 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
ACK fd6a7d3 |
Also rename the busy wait-for-log method to prevent recurrence. See #27039 (comment)