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

testing: delayed output flushing for t.Errorf() makes debugging failures difficult in tests #23567

Closed
michaelsafyan opened this issue Jan 26, 2018 · 1 comment

Comments

@michaelsafyan
Copy link

@michaelsafyan michaelsafyan commented Jan 26, 2018

It appears that t.Errorf() doesn't actually write or flush the output to stderr/stdout until the completeion of the test. This is problematic if there are interleaved log-lines in the code invoked between t.Errorf() calls, since it is then impossible to see which logs belong to which assertion (since all of the assertion failures appear after the debug output associated with different test assertions).

@ALTree

This comment has been minimized.

Copy link
Member

@ALTree ALTree commented Jan 26, 2018

This is a dup of #23213 (Errorf, under the hood, just calls Logf). Closing this in favour of the older thread.

@ALTree ALTree closed this Jan 26, 2018
@ALTree ALTree changed the title Delayed output flushing for t.Errorf() makes debugging failures difficult in tests. testing: delayed output flushing for t.Errorf() makes debugging failures difficult in tests Jan 26, 2018
@golang golang locked and limited conversation to collaborators Jan 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.