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

go test -v should print logs as they're executed, not at the end #24262

Closed
jeanbza opened this issue Mar 6, 2018 · 2 comments
Closed

go test -v should print logs as they're executed, not at the end #24262

jeanbza opened this issue Mar 6, 2018 · 2 comments

Comments

@jeanbza
Copy link
Contributor

jeanbza commented Mar 6, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10 darwin/amd64

What did you do?

go test -v with some code that hangs.

What did you expect to see?

Logs.

What did you see instead?

Nothing. In the case where my code hangs forever, I don't get any test logs because logs are only printed in the success/fail case. Ctrl+C means I never get logs.

Furthermore, -v not showing logs means I get no sense of timing in test runs.

It's a real bummer to mass replace t.Log with fmt.Println, get my tests fixed, and then mass replace fmt.Println with t.Log.

@andybons
Copy link
Member

andybons commented Mar 6, 2018

Duplicate of #23213

@andybons andybons marked this as a duplicate of #23213 Mar 6, 2018
@andybons andybons closed this as completed Mar 6, 2018
@jeanbza
Copy link
Contributor Author

jeanbza commented Mar 6, 2018

👍 thanks!

@golang golang locked and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants