-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: testing a list of packages blocks the real-time output #27826
Comments
@gopherbot please, add label Testing. |
Related to #24929. |
A flag to disable stdout buffering could be helpful. Or, at a minimum, document the effect of the -p (and -count ?) flags on output buffering. As a note, this bug is not quite a duplicate of #24929, as it affects all of stdout, not just the uses of t.Log (Maybe the underlying mechanism is the same, I don't know.) We care about stdout too because we're doing heavy initializations in TestMain where t.Log isn't available, and we want to see the progress messages as they happen. |
Go will only stream test logs if it is testing a single module at a time, otherwise it will buffer the logs to the end and then display them. This causes issues for CI as it means there's no idea what is happening at the moment and the logs will be missing if the run is cancelled. See golang/go#27826.
* Add port, remote backup & CIDRs support Add support for: * Specifying the port number on a normal or active/active database * Configuring backups for normal or active/active databases * Specifying multiple CIDR ranges when peering a normal or active/active database * Run all acceptance tests in parallel * Stream `go test` logs Go will only stream test logs if it is testing a single module at a time, otherwise it will buffer the logs to the end and then display them. This causes issues for CI as it means there's no idea what is happening at the moment and the logs will be missing if the run is cancelled. See golang/go#27826. * Run all acceptance tests in parallel CI is taking far too long and needs to be sped up.
What version of Go are you using (
go version
)?go version go1.11 darwin/amd64
Does this issue reproduce with the latest release?
Yes, reproduced on tip -
go version devel +ce58a39fca Thu Sep 20 22:52:44 2018 +0000 darwin/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
go test -v -count=1 ./...
doesn't print real-time test output if you got subpackages.What did you expect to see?
I expect to see the output successively as the test is running.
And I will see it if run
go test -v -count=1 .
instead.What did you see instead?
Using
./...
doesn't produce real-time output.The output is produced only when all the tests are finished.
It's not convenient when you run tests on a CI and see only "go test -v ./..." line for several minutes.
You don't have any idea if the tests have stuck somewhere or they are just too slow.
I understand that such behaviour may be connected with running the tests in parallel, but maybe we could do anything about it?
The text was updated successfully, but these errors were encountered: