test: remove assert_blockchain_height #21117

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2102-testNoTimeout changing 1 files +8 −22
  1. MarcoFalke commented at 2:38 pm on February 8, 2021: member

    This simplifies the code and solves intermittent timeouts caused by commit 0d39b5848a7a341cd2b958336861cdd4098e2616.

    E.g. https://cirrus-ci.com/task/5196092369272832?command=ci#L3126

    0 test  2021-02-08T12:27:56.275000Z TestFramework (ERROR): Assertion failed 
    1                                   Traceback (most recent call last):
    2                                     File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 127, in main
    3                                       self.run_test()
    4                                     File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/feature_assumevalid.py", line 180, in run_test
    5                                       self.assert_blockchain_height(self.nodes[0], 101)
    6                                     File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/feature_assumevalid.py", line 92, in assert_blockchain_height
    7                                       assert False, "blockchain too short after timeout: %d" % current_height
    8                                   AssertionError: blockchain too short after timeout: 101
    
  2. fanquake added the label Tests on Feb 8, 2021
  3. test: remove assert_blockchain_height fa0a4d6c60
  4. MarcoFalke force-pushed on Feb 8, 2021
  5. glozow commented at 1:46 am on February 9, 2021: member

    ACK fa0a4d6c60

    No qualms with removing assert_blockchain_height since it isn’t necessary anymore. Regarding the timeouts, using TestFramework.wait_until increases the timeout from 10 to 60 which I guess should fix it. I think it’d be better to also send_and_ping(msg_block) the good blocks and then wait_for_disconnect the bad block in send_blocks_until_disconnected (especially since it’s named as such).

  6. MarcoFalke merged this on Feb 9, 2021
  7. MarcoFalke closed this on Feb 9, 2021

  8. MarcoFalke commented at 6:45 am on February 9, 2021: member

    increases the timeout from 10 to 60

    This is the default timeout, but it is scaled (larger) in the ci configs via --timeout-factor.

    I think it’d be better to also send_and_ping(msg_block) the good blocks and then wait_for_disconnect the bad block in send_blocks_until_disconnected (especially since it’s named as such)

    Currently the function can’t distinguish between good and bad blocks, I think

  9. MarcoFalke deleted the branch on Feb 9, 2021
  10. sidhujag referenced this in commit e3d8c41cca on Feb 9, 2021
  11. ajtowns commented at 2:07 am on February 10, 2021: member
    Post-merge ACK fa0a4d6c605b8ed47796f68068d6273bef7fcaef code-review only
  12. Fabcien referenced this in commit 23e2e06722 on Feb 1, 2022
  13. PastaPastaPasta referenced this in commit 39faf738b9 on Mar 5, 2022
  14. DrahtBot locked this on Aug 18, 2022

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-07-05 19:13 UTC

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