wait_until_exit API
A non-blocking function which periodically checks the node's status code.
Bonus info:
Once the async Drop trait support is introduced in Rust, we can remove the loop and use a non-blocking tokio::process::Command and then call a tokio version of wait() function on it.
Because, calling wait() on std::process::Command will block the
entire tokio runtime and the whole test process will be stopped until
the node is actually killed - which is bad if we have other
tokio threads running.
So looping with a non-blocking try_wait() is the alternative solution.
wait_until_exit
API A non-blocking function which periodically checks the node's status code.Bonus info: Once the async
Drop
trait support is introduced in Rust, we can remove the loop and use a non-blockingtokio::process::Command
and then call a tokio version ofwait()
function on it.Because, calling
wait()
onstd::process::Command
will block the entire tokio runtime and the whole test process will be stopped until the node is actually killed - which is bad if we have other tokio threads running.So looping with a non-blocking
try_wait()
is the alternative solution.