-
Notifications
You must be signed in to change notification settings - Fork 38.7k
tests: Allow closed rpc handler in assert_start_raises_init_error #14413
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
Conversation
|
Concept ACK I've seen this in AppVeyor. Thanks for addressing! |
|
Code change seems reasonable, but I don't understand the issue. What would cause the RPC handler to become unregistered while the test framework is in |
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.
Maybe just pass this on as well? This way we'd make sure to always have an exit code as opposed to randomly this message or an exit code due to the racyness.
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.
Sure, fixed
|
@ryanofsky If the node can't initialize itself shuts down itself without having the test framework shut it down. |
ryanofsky
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.
@ryanofsky If the node can't initialize itself shuts down itself without having the test framework shut it down.
Thanks. I didn't realize assert_start_raises_init_error would wait for RPCs to be ready. But I guess it needs to in order to call shut down the node when the error doesn't trigger.
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 comment is confusing without mentioning why the server is shutting down. Maybe change it to something like:
# Service unavailable, RPC server started but is shutting down due to errorThere 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.
Comment added
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.
Would it be good to call self.process.wait() here and include the exit code in the exception, so this is more similar to the previous FailedToStartError exception above?
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 would prefer @MarcoFalke's method, then we don't have to raise it here again.
|
utACK 62c304e |
ryanofsky
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.
utACK 62c304e
…raises_init_error 62c304e tests: Allow closed http server in assert_start_raises_init_error (Chun Kuan Lee) Pull request description: The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342 `non-JSON HTTP response with \'%i %s\' from server` (503 Service Unavailable) See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server" Tree-SHA512: e1f50ab9096cf23494ccc2850c01516c4a75f112c99108759157b22fce2011682a4b88216f206702f6a56e960182c00098053ad75f13aa0eafe27046adae63da
…raises_init_error 62c304e tests: Allow closed http server in assert_start_raises_init_error (Chun Kuan Lee) Pull request description: The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342 `non-JSON HTTP response with \'%i %s\' from server` (503 Service Unavailable) See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server" Tree-SHA512: e1f50ab9096cf23494ccc2850c01516c4a75f112c99108759157b22fce2011682a4b88216f206702f6a56e960182c00098053ad75f13aa0eafe27046adae63da
…raises_init_error (#3157) 62c304e tests: Allow closed http server in assert_start_raises_init_error (Chun Kuan Lee) Pull request description: The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342 `non-JSON HTTP response with \'%i %s\' from server` (503 Service Unavailable) See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server" Tree-SHA512: e1f50ab9096cf23494ccc2850c01516c4a75f112c99108759157b22fce2011682a4b88216f206702f6a56e960182c00098053ad75f13aa0eafe27046adae63da
The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342
non-JSON HTTP response with \'%i %s\' from server(503 Service Unavailable)See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server"