Skip to content

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

Closed

Description

@michaelsafyan

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).

Activity

  1. ALTree commented on Jan 26, 2018

    @ALTree
    Member

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

  2. 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[/+] on Jan 26, 2018
  3. locked and limited conversation to collaborators on Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions