cmd/go: go test -json does not print subtest results as they become available #29811
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
ToolSpeed
Milestone
What version of Go are you using (
go version
)?When I run
go test -json
, it prints results for top level tests when those tests complete.But for subtests, all the results are printed only when the last sibling subtest completes.
For example, consider the following program:
this produces the following result (each line preceded by the time that line was printed):
Output of
go test -json
Note that the Test2 pass result is printed as soon as it passes, but all the other results are printed at the same time.
Although this might be a necessary restriction when running
go test -v
because of the way test output is indented, there doesn't seem to be a need for this restriction when the output is JSON.The text was updated successfully, but these errors were encountered: