Skip to content
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

Merged
merged 5 commits into from
Sep 25, 2023
Merged

Add tests for blob dissemination #416

merged 5 commits into from
Sep 25, 2023

Conversation

zeegomo
Copy link
Contributor

@zeegomo zeegomo commented Sep 18, 2023

No description provided.

Comment on lines +46 to +47
std::thread::spawn(move || cmd.run().unwrap())
.join()
.unwrap();
Copy link
Collaborator

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? 🤔

Copy link
Contributor Author

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

Copy link
Collaborator

@danielSanchezQ danielSanchezQ left a 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);
}
Copy link
Contributor

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.

@zeegomo zeegomo merged commit 3b64cd6 into master Sep 25, 2023
11 checks passed
@jakubgs jakubgs deleted the da-disseminate-tests branch February 15, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants