[tests] fix timeout issues from TestNode #11077

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:test_node_fixes changing 2 files +13 −8
  1. jnewbery commented at 2:55 PM on August 17, 2017: member

    Fixes a couple of bugs from the introduction of TestNode:

    • test scripts were no longer able to specify a custom timeout for starting a node. Therefore tests with nodes that take a long time to start up (eg pruning.py) would fail.
    • the test for whether a node has failed on start up was broken by changing 'assert x is None' to 'assert not x'. Since subprocess.poll() can return None (indicating the node is still running) or 0 (indicating the node exited with return code 0), this was a regression.
  2. laanwj added the label Tests on Aug 17, 2017
  3. laanwj commented at 1:11 PM on August 20, 2017: member

    utACK, needs rebase

  4. [tests] fix timeout issues from TestNode
    Fixes a couple of bugs from the introduction of TestNode:
    
    - test scripts were no longer able to specify a custom timeout for
    starting a node. Therefore tests with nodes that take a long time to
    start up (eg pruning.py) would fail.
    - the test for whether a node has failed on start up was broken
    by changing 'assert x is None' to 'assert not x'. Since
    subprocess.poll() can return None (indicating the node is still running)
    or 0 (indicating the node exited with return code 0), this was a
    regression.
    2b4ea520b7
  5. jnewbery force-pushed on Aug 23, 2017
  6. jnewbery commented at 3:06 PM on August 23, 2017: member

    Thanks @laanwj . Rebased

  7. mess110 commented at 6:10 PM on August 23, 2017: contributor

    Looks good, also ran tests locally

  8. laanwj merged this on Aug 23, 2017
  9. laanwj closed this on Aug 23, 2017

  10. laanwj referenced this in commit 41496e20f3 on Aug 23, 2017
  11. MarcoFalke commented at 1:10 AM on August 25, 2017: member

    post merge utACK 2b4ea52

  12. in test/functional/test_framework/test_node.py:41 in 2b4ea520b7
      33 | @@ -34,7 +34,11 @@ def __init__(self, i, dirname, extra_args, rpchost, timewait, binary, stderr, mo
      34 |          self.index = i
      35 |          self.datadir = os.path.join(dirname, "node" + str(i))
      36 |          self.rpchost = rpchost
      37 | -        self.rpc_timeout = timewait
      38 | +        if timewait:
      39 | +            self.rpc_timeout = timewait
      40 | +        else:
      41 | +            # Wait for up to 60 seconds for the RPC server to respond
      42 | +            self.rpc_timeout = 60
    


    MarcoFalke commented at 10:35 AM on August 30, 2017:

    Previously we used a default of HTTP_TIMEOUT = 30 (authproxy)

    Why was this changed?


    jnewbery commented at 2:12 PM on August 30, 2017:

    Longer is better (I think?). Travis is so unpredictable that one minute seemed appropriate.

    We can tune it back down if you think that's better.

  13. MarcoFalke referenced this in commit 28f788e47e on Sep 1, 2017
  14. MarcoFalke referenced this in commit 1d80d1e319 on Oct 3, 2017
  15. PastaPastaPasta referenced this in commit 77ddbff1c2 on Sep 19, 2019
  16. PastaPastaPasta referenced this in commit f5e7bf51cf on Sep 19, 2019
  17. PastaPastaPasta referenced this in commit c08ab6a097 on Sep 23, 2019
  18. PastaPastaPasta referenced this in commit db98ce617e on Sep 24, 2019
  19. codablock referenced this in commit d09f88d985 on Sep 24, 2019
  20. codablock referenced this in commit 17bb230d74 on Sep 24, 2019
  21. barrystyle referenced this in commit 64ba57c2f4 on Jan 22, 2020
  22. barrystyle referenced this in commit 4809d1d470 on Jan 22, 2020
  23. MarcoFalke locked this on Sep 8, 2021

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-13 18:15 UTC

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