Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Jun 19, 2017

Motivated by #10569

@maflcko maflcko added the Tests label Jun 19, 2017
Copy link
Contributor

@jonasschnelli jonasschnelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa75f235f14c05c7d7d433396f4f49809860340d

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@maflcko maflcko force-pushed the Mf1706-qaStopAtHeight branch 2 times, most recently from fac8c50 to fac5a16 Compare June 20, 2017 11:30
@maflcko maflcko force-pushed the Mf1706-qaStopAtHeight branch from fac5a16 to 5555fa8 Compare June 20, 2017 11:35
@achow101
Copy link
Member

ACK 5555fa8

@maflcko maflcko merged commit 5555fa8 into bitcoin:master Jun 22, 2017
maflcko pushed a commit that referenced this pull request Jun 22, 2017
5555fa8 qa: Add stopatheight test (MarcoFalke)

Tree-SHA512: ea3f318c3dc73a885db5e258f5d6a25e0017e2360a72ac5f6914bce6f7798d36aca45d2626aafd57ead744bd28fd38b561207a7a547a1d417e594976c35bccee
@maflcko maflcko deleted the Mf1706-qaStopAtHeight branch June 22, 2017 08:53
assert_equal(self.nodes[0].getblockcount(), 206)
self.log.debug('Node should not stop at this height')
assert_raises(subprocess.TimeoutExpired, lambda: bitcoind_processes[0].wait(timeout=3))
self.nodes[0].generate(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 11, 2019
5555fa8 qa: Add stopatheight test (MarcoFalke)

Tree-SHA512: ea3f318c3dc73a885db5e258f5d6a25e0017e2360a72ac5f6914bce6f7798d36aca45d2626aafd57ead744bd28fd38b561207a7a547a1d417e594976c35bccee
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants