[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. fanquake cross-referenced this on Aug 20, 2017 from issue test: Increase initial RPC timeout to 60 seconds by laanwj
  4. laanwj commented at 1:11 PM on August 20, 2017: member

    utACK, needs rebase

  5. [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
  6. jnewbery force-pushed on Aug 23, 2017
  7. jnewbery commented at 3:06 PM on August 23, 2017: member

    Thanks @laanwj . Rebased

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

    Looks good, also ran tests locally

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

  11. laanwj referenced this in commit 41496e20f3 on Aug 23, 2017
  12. jnewbery cross-referenced this on Aug 23, 2017 from issue TestNode tidyups by jnewbery
  13. MarcoFalke commented at 1:10 AM on August 25, 2017: member

    post merge utACK 2b4ea52

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

  15. MarcoFalke referenced this in commit 28f788e47e on Sep 1, 2017
  16. MarcoFalke referenced this in commit 1d80d1e319 on Oct 3, 2017
  17. PastaPastaPasta referenced this in commit 77ddbff1c2 on Sep 19, 2019
  18. PastaPastaPasta referenced this in commit f5e7bf51cf on Sep 19, 2019
  19. PastaPastaPasta referenced this in commit c08ab6a097 on Sep 23, 2019
  20. PastaPastaPasta referenced this in commit db98ce617e on Sep 24, 2019
  21. codablock referenced this in commit d09f88d985 on Sep 24, 2019
  22. codablock referenced this in commit 17bb230d74 on Sep 24, 2019
  23. barrystyle referenced this in commit 64ba57c2f4 on Jan 22, 2020
  24. barrystyle referenced this in commit 4809d1d470 on Jan 22, 2020
  25. bitcoin 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-05-20 06:55 UTC