-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[qa] TestNode: Add wait_until_stopped helper method #11067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[qa] TestNode: Add wait_until_stopped helper method #11067
Conversation
|
Concept ACK, but I'm concerned about defining a |
|
Rebase on #11068? |
fa8d9e1 to
fa7d395
Compare
2b687c5 to
fa7d395
Compare
|
Looks great. Tested ACK fa7d395048c9395bbf23439c2986751db560aa8b |
fa7d395 to
fa72a00
Compare
|
Solved merge conflict fa7d39504 ... fa72a0011 |
jnewbery
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK fa72a0011bead99f60e6442b79ddad407d3a3df2.
One nit inline. Otherwise looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this method should also set self.rpc to None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jnewbery Done
9e8827c to
aa91654
Compare
aa91654 to
faa8d95
Compare
| ) | ||
| from .authproxy import JSONRPCException | ||
|
|
||
| BITCOIND_PROC_WAIT_TIMEOUT = 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constant is now only used in one place. Perhaps remove it as a constant and add it as an integer literal in the definition of wait_until_stopped() with a comment.
If not, perhaps move this constant assignment down to just above the call to wait_until_stopped()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to put constants at the top of a file and my personal taste is that it is ugly to place them between or inside methods/functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's reasonable
|
utACK faa8d95 |
faa8d95 [qa] TestNode: Add wait_until_stopped helper method (MarcoFalke) Pull request description: This adds a helper method `wait_until_stopped` to the `TestNode` class. This should prevent numerous `time.sleep()` over all places. Additionally, the timeout behavior is restored. (Was removed by the introduction of `TestNode`.) This should prevent tests from running indefinitely by accident. Tree-SHA512: 7133fc64d55711869c4e372e9d30625c98f1237fb3578c24a26900d9319831f10eb95592d7b08e536fa706158dffb0abf9197f11c5d9ef605c880628e1a6533f
Github-Pull: bitcoin#11067 Rebased-From: faa8d95
faa8d95 [qa] TestNode: Add wait_until_stopped helper method (MarcoFalke) Pull request description: This adds a helper method `wait_until_stopped` to the `TestNode` class. This should prevent numerous `time.sleep()` over all places. Additionally, the timeout behavior is restored. (Was removed by the introduction of `TestNode`.) This should prevent tests from running indefinitely by accident. Tree-SHA512: 7133fc64d55711869c4e372e9d30625c98f1237fb3578c24a26900d9319831f10eb95592d7b08e536fa706158dffb0abf9197f11c5d9ef605c880628e1a6533f
This adds a helper method
wait_until_stoppedto theTestNodeclass. This should prevent numeroustime.sleep()over all places.Additionally, the timeout behavior is restored. (Was removed by the introduction of
TestNode.)This should prevent tests from running indefinitely by accident.