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

harness: consume output of balancer when running tests #1188

Closed
dyc3 opened this issue Dec 21, 2023 · 3 comments · Fixed by #1221
Closed

harness: consume output of balancer when running tests #1188

dyc3 opened this issue Dec 21, 2023 · 3 comments · Fixed by #1221
Assignees
Labels
balancer Improvements or additions to the load balancer tests Issues pertaining to tests

Comments

@dyc3
Copy link
Owner

dyc3 commented Dec 21, 2023

When running harness tests against the balancer, the balancer outputs a ton of logs. It would be nice if the harness could consume these logs and re emit them so that they don't show up in the output unless --nocapture is used. Note that --nocapture already exists and so implementing that part is not necessary, eg. cargo test -- --nocapture

@dyc3 dyc3 converted this from a draft issue Dec 21, 2023
@dyc3 dyc3 added tests Issues pertaining to tests balancer Improvements or additions to the load balancer labels Dec 21, 2023
@dyc3 dyc3 added this to the Better User Management milestone Dec 21, 2023
@Victor-M-Giraldo
Copy link
Contributor

I would like to work on this.

@Victor-M-Giraldo
Copy link
Contributor

The log crate seems to do this. If you don't want to add another crate, could you remind me of what the method for the likely fix for this issue is?

I believe it was reading in the standard output and immediately printing it back out, but I didn't get to write it all down.

@dyc3
Copy link
Owner Author

dyc3 commented Jan 12, 2024

We are already using the tracing crate for logging.

You need to grab the standard out and standard error of the child process, and immediately log it back out as the parent process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
balancer Improvements or additions to the load balancer tests Issues pertaining to tests
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants