test: Avoid intermittent issues due to async events in validationinterface_tests #28150

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2307-test-no-async- changing 1 files +1 −1
  1. maflcko commented at 3:34 PM on July 25, 2023: member

    Currently the tests have many issues:

    • They setup the genesis block, even though it is not needed
    • They queue an async UpdatedBlockTip even, which causes intermittent issues: #28146 (comment)

    Fix all issues by trimming down the setup to just ChainTestingSetup.

  2. test: Avoid intermittent issues due to async events in validationinterface_tests faca9a3d5a
  3. DrahtBot commented at 3:34 PM on July 25, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK Crypt-iQ

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

  4. DrahtBot added the label Tests on Jul 25, 2023
  5. maflcko commented at 3:37 PM on July 25, 2023: member

    An alternative might be to call SyncWithValidationInterfaceQueue at the start of the test.

  6. Crypt-iQ commented at 4:13 PM on July 25, 2023: contributor

    An alternative might be to call SyncWithValidationInterfaceQueue at the start of the test.

    Tested it and both approaches work, not sure which is better. Using ChainTestingSetup should be faster?

  7. maflcko commented at 5:39 PM on July 25, 2023: member

    Using ChainTestingSetup should be faster?

    It is doing less setup, so it may also be faster.

  8. Crypt-iQ approved
  9. Crypt-iQ commented at 7:56 PM on July 25, 2023: contributor

    tACK faca9a3d5a6887517d02b994a43d0e1101b718bc

  10. maflcko added this to the milestone 26.0 on Jul 26, 2023
  11. fanquake merged this on Jul 26, 2023
  12. fanquake closed this on Jul 26, 2023

  13. maflcko deleted the branch on Jul 26, 2023
  14. maflcko commented at 1:05 PM on July 26, 2023: member

    Interestingly, I can not reproduce this easily with rr. I tried:

    while rr record  --chaos ./src/test/test_bitcoin -t validationinterface_tests/unregister_all_during_call  ; do true ; done
    
  15. Crypt-iQ commented at 1:49 AM on July 28, 2023: contributor

    Interestingly, I can not reproduce this easily with rr. I tried:

    while rr record  --chaos ./src/test/test_bitcoin -t validationinterface_tests/unregister_all_during_call  ; do true ; done
    

    I was able to reproduce by adding -printtoconsole=1

  16. sidhujag referenced this in commit da984d973e on Aug 9, 2023
  17. UdjinM6 referenced this in commit 5fdb05c4c2 on Nov 21, 2023
  18. PastaPastaPasta referenced this in commit 2d631df2e3 on Nov 26, 2023
  19. PastaPastaPasta referenced this in commit e6d6e8a1eb on Nov 26, 2023
  20. ogabrielides referenced this in commit 4660170eae on Dec 4, 2023
  21. bitcoin locked this on Jul 27, 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: 2026-04-24 09:14 UTC

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