Skip to content

create looping utility with node_client.send #806

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

Open
czarte opened this issue Jul 29, 2024 · 1 comment
Open

create looping utility with node_client.send #806

czarte opened this issue Jul 29, 2024 · 1 comment

Comments

@czarte
Copy link
Collaborator

czarte commented Jul 29, 2024

This card is designed for integration tests where we are starting node thru the daemon and we need to be sure that node is down before we finish the test, to ensure port 53 is free on the Actions machine

Create a test utility with a node_client.send(shutdown_request) and keep sending the shutdown request in a loop until the Node doesn't response anymore.

masq_lib/src/test_utils/ui_connection.rs

create new function in the impl UiConnection that will be sending shutdown requests in the loop to node_client.

This function is reqired for ui_gateway tests which operate with Node run by Daemon, because in the test we do not have access to Node it self, only to the Daemon, so we need to sending requests to shutdown until we are sure the Node is down. After that we can wait_for_exit on the Daemon.

@czarte czarte converted this from a draft issue Jul 29, 2024
@czarte czarte changed the title create node_client.send create looping utility with node_client.send Jul 29, 2024
@dnwiebe
Copy link

dnwiebe commented Aug 11, 2024

Note that when you instruct the Daemon to start a Node, and the Daemon successfully does so, the response message the Daemon sends you will have the operating system's process ID for the Node that was started.

If you ask the OS whether the Node's process is still running, you'll get a more reliable answer than you will if you ask the UI Gateway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready
Development

No branches or pull requests

2 participants