test: use sleepy wait-for-log in reindex readonly #30006
pull pinheadmz wants to merge 1 commits into bitcoin:master from pinheadmz:sleepy-wait changing 3 files +3 −3-
pinheadmz commented at 6:04 pm on April 30, 2024: memberAlso rename the busy wait-for-log method to prevent recurrence. See #27039 (review)
-
DrahtBot commented at 6:05 pm on April 30, 2024: 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.
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 added the label Tests on Apr 30, 2024
-
in test/functional/feature_reindex_readonly.py:78 in 453c871184 outdated
74@@ -75,7 +75,7 @@ def reindex_readonly(self): 75 76 if undo_immutable: 77 self.log.debug("Attempt to restart and reindex the node with the unwritable block file") 78- with self.nodes[0].wait_for_debug_log([b"Reindexing finished"]): 79+ with self.nodes[0].assert_debug_log(["Reindexing finished"]):
maflcko commented at 6:10 pm on April 30, 2024:0 with self.nodes[0].assert_debug_log(["Reindexing finished"], timeout=30):
I think the timeout needs to be preserved?
pinheadmz commented at 6:13 pm on April 30, 2024:Gotcha, the default timeout inwait_for_debug_log()
nowbusy_wait_for_debug_log()
is 60 unless im mistaken?
maflcko commented at 6:14 pm on April 30, 2024:Sure, any value works. But 2 seconds may be a bit on the risky side.
pinheadmz commented at 6:15 pm on April 30, 2024:done, thanksmaflcko commented at 6:10 pm on April 30, 2024: memberThanks. lgtm ACK 453c871184e0d62111028d25ec327cc7dd2f0099, after fixed-up timeout value.test: use sleepy wait-for-log in reindex readonly
Also rename the busy wait-for-log method to prevent recurrence
pinheadmz force-pushed on Apr 30, 2024maflcko commented at 6:27 pm on April 30, 2024: memberutACK fd6a7d3a13d89d74e161095b0e9bd3570210a40ctdb3 commented at 0:54 am on May 1, 2024: contributorACK for fd6a7d3a13d89d74e161095b0e9bd3570210a40c
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 approvedrkrux commented at 12:39 pm on May 8, 2024: noneACK fd6a7d3
Make and tests successful. I found this answer helpful that explains how
yield
andwith
interact with each other: https://stackoverflow.com/a/35489897/12218815achow101 commented at 10:23 pm on May 9, 2024: memberACK fd6a7d3a13d89d74e161095b0e9bd3570210a40cachow101 merged this on May 9, 2024achow101 closed this on May 9, 2024
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: 2024-09-28 22:12 UTC
More mirrored repositories can be found on mirror.b10c.me