qa: Add stopatheight test #10632

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1706-qaStopAtHeight changing 1 files +19 −1
  1. MarcoFalke commented at 7:24 PM on June 19, 2017: member

    Motivated by #10569

  2. MarcoFalke added the label Tests on Jun 19, 2017
  3. jonasschnelli approved
  4. jonasschnelli commented at 6:05 AM on June 20, 2017: contributor

    ACK fa75f235f14c05c7d7d433396f4f49809860340d

  5. in test/functional/blockchain.py:51 in fa75f235f1 outdated
      47 |          self._test_getnetworkhashps()
      48 | -        self.nodes[0].verifychain(4, 0)
      49 | +        self._test_stopatheight()
      50 | +        assert self.nodes[0].verifychain(4, 0)
      51 | +
      52 | +    def _test_stopatheight(self):
    


    jnewbery commented at 8:59 AM on June 20, 2017:

    micronit: The other subtests are defined in the order that they're called. Perhaps place this definition after the other subtests?

  6. jnewbery commented at 9:02 AM on June 20, 2017: member

    Tested ACK fa75f235f14c05c7d7d433396f4f49809860340d. Looks great!

    Not sure that this entirely fits in blockchain.py, which is currently just for testing rpcs in rpc/blockchain.py. However, I can't think of any better place for it right now and it's definitely an improvement to have this test!

  7. MarcoFalke force-pushed on Jun 20, 2017
  8. MarcoFalke force-pushed on Jun 20, 2017
  9. qa: Add stopatheight test 5555fa8b74
  10. MarcoFalke force-pushed on Jun 20, 2017
  11. achow101 commented at 1:33 AM on June 22, 2017: member

    ACK 5555fa8b74bc3c8e68232acbf4c54b9a8fadb8f2

  12. MarcoFalke merged this on Jun 22, 2017
  13. MarcoFalke closed this on Jun 22, 2017

  14. MarcoFalke referenced this in commit c68a9a6927 on Jun 22, 2017
  15. MarcoFalke deleted the branch on Jun 22, 2017
  16. in test/functional/blockchain.py:143 in 5555fa8b74
     138 | +        assert_equal(self.nodes[0].getblockcount(), 200)
     139 | +        self.nodes[0].generate(6)
     140 | +        assert_equal(self.nodes[0].getblockcount(), 206)
     141 | +        self.log.debug('Node should not stop at this height')
     142 | +        assert_raises(subprocess.TimeoutExpired, lambda: bitcoind_processes[0].wait(timeout=3))
     143 | +        self.nodes[0].generate(1)
    


    sdaftuar commented at 1:47 AM on June 23, 2017:

    I believe this call to generate might fail -- isn't it possible the node's shutdown will interrupt the RPC response? That looks to me like what happened here: https://travis-ci.org/bitcoin/bitcoin/jobs/245917226#L2275

    I think we should wrap the generate(1) in a try...except and allow for the RPC to fail due to connection refused, etc.

  17. PastaPastaPasta referenced this in commit 0d029a23d2 on Jul 6, 2019
  18. PastaPastaPasta referenced this in commit ebb10db19e on Jul 8, 2019
  19. PastaPastaPasta referenced this in commit 1a1b5cff49 on Jul 9, 2019
  20. PastaPastaPasta referenced this in commit 43c952d2eb on Jul 11, 2019
  21. barrystyle referenced this in commit 72cac97790 on Jan 22, 2020
  22. DrahtBot 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-14 21:15 UTC

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