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
  1. pinheadmz commented at 6:04 pm on April 30, 2024: member
    Also rename the busy wait-for-log method to prevent recurrence. See #27039 (review)
  2. 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.

    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.

  3. DrahtBot added the label Tests on Apr 30, 2024
  4. 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 in wait_for_debug_log() now busy_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, thanks
  5. maflcko commented at 6:10 pm on April 30, 2024: member
    Thanks. lgtm ACK 453c871184e0d62111028d25ec327cc7dd2f0099, after fixed-up timeout value.
  6. test: use sleepy wait-for-log in reindex readonly
    Also rename the busy wait-for-log method to prevent recurrence
    fd6a7d3a13
  7. pinheadmz force-pushed on Apr 30, 2024
  8. maflcko commented at 6:27 pm on April 30, 2024: member
    utACK fd6a7d3a13d89d74e161095b0e9bd3570210a40c
  9. tdb3 commented at 0:54 am on May 1, 2024: contributor

    ACK 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.

  10. rkrux approved
  11. rkrux commented at 12:39 pm on May 8, 2024: none

    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

  12. achow101 commented at 10:23 pm on May 9, 2024: member
    ACK fd6a7d3a13d89d74e161095b0e9bd3570210a40c
  13. achow101 merged this on May 9, 2024
  14. achow101 closed this on May 9, 2024


github-metadata-mirror

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

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me