Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Aug 16, 2017

This moves wait_until to util.py to make it generally available to python tests.
Also, wait_until now takes an optional lock that is acquired while testing the predicate.
Previously the lock was always acquired, even when it was not necessary, cf. disconnect_ban.py.

@maflcko maflcko added the Tests label Aug 16, 2017
@jnewbery
Copy link
Contributor

I don't love this name, but we can tidy up in a later commit so concept ACK (since it's required for #11067)

@maflcko maflcko force-pushed the Mf1708-qaWaitUntilMiniNode branch from faf681e to 02a75ed Compare August 17, 2017 10:40
@maflcko maflcko force-pushed the Mf1708-qaWaitUntilMiniNode branch from 02a75ed to 08ce33f Compare August 17, 2017 13:17
@maflcko maflcko changed the title [WIP] qa: Replace wait_until with wait_until_mn (scripted) qa: Move wait_until to util Aug 17, 2017
@maflcko
Copy link
Member Author

maflcko commented Aug 17, 2017 via email

@jnewbery
Copy link
Contributor

Great! Tested ACK 08ce33f . I've long wanted to move the assert up into wait_util(), but for some reason I thought there were more call sites where the return value wasn't being asserted.

This is a good change. wait_until() is a pure utility function and should live in util.py. The caller passing in the lock seems fine to me.

@maflcko maflcko merged commit 08ce33f into bitcoin:master Aug 23, 2017
maflcko pushed a commit that referenced this pull request Aug 23, 2017
08ce33f qa: Move wait_until to util (MarcoFalke)

Pull request description:

  This moves `wait_until` to `util.py` to make it generally available to python tests.
  Also, `wait_until` now takes an optional lock that is acquired while testing the predicate.
  Previously the lock was always acquired, even when it was not necessary, cf. `disconnect_ban.py`.

Tree-SHA512: 18e452a017a6566fa8ad09bde058e1b841e167039dc63299e70cfa7a6dcbc779581e60ca3e8eb2f1b610767d5208b9376c203eb11015b250fd0542b5eb4215a8
@maflcko maflcko deleted the Mf1708-qaWaitUntilMiniNode branch August 23, 2017 21:18
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 3, 2017
Github-Pull: bitcoin#11068
Rebased-From: 08ce33f
codablock pushed a commit to codablock/dash that referenced this pull request Sep 24, 2019
08ce33f qa: Move wait_until to util (MarcoFalke)

Pull request description:

  This moves `wait_until` to `util.py` to make it generally available to python tests.
  Also, `wait_until` now takes an optional lock that is acquired while testing the predicate.
  Previously the lock was always acquired, even when it was not necessary, cf. `disconnect_ban.py`.

Tree-SHA512: 18e452a017a6566fa8ad09bde058e1b841e167039dc63299e70cfa7a6dcbc779581e60ca3e8eb2f1b610767d5208b9376c203eb11015b250fd0542b5eb4215a8
@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.

2 participants