-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add tests for blob dissemination #416
Conversation
ceb0f72
to
bf0bbd6
Compare
std::thread::spawn(move || cmd.run().unwrap()) | ||
.join() | ||
.unwrap(); |
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.
why to spawn a thread to immediately join? 🤔
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.
cmd.run()
tries to spawn a new tokio runtime because it's using overwatch. Either we do that on a new thread or we spawn directly a new process by invoking the command on a terminal
Split nomos-cli into lib and bin and make config public so that it can be reused in tests
72b350b
to
7b630a8
Compare
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.
Except the comment (which is more curiosity than anything) looks ok.
@@ -174,6 +174,8 @@ impl ServiceCore for DisseminateService { | |||
.is_err() | |||
{ | |||
tracing::error!("Timeout reached, check the logs for additional details"); | |||
service_state.overwatch_handle.shutdown().await; | |||
std::process::exit(1); | |||
} |
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.
It seems that we also need to exit the process even if the disseminate()
returns an error (within the timeout period). If not, the test will be passed.
No description provided.