Skip to content

Commit 465d23e

Browse files
committed
test: use -json to prevent output buffering
When testing multiple packages, "go test" buffers all the output until the tests finish, even with verbose (-v) mode. This is because parallel tests could otherwise interleave their output and be difficult to read. Across packages, tests could have the same name. In JSON mode (-json), there's an explicit "Package" field in the output, so "go test" can safely print output as it comes in. This ensures that if the tests are running for a long time due to server errors, the user can see the output as it comes in. Otherwise, Jenkins may terminate the job at the configured 40m deadline, before any meaningful output is printed. golang/go#46959 Change-Id: Ia6e0bf92e927b14f56e601839b27141bb6dd1298
1 parent 9183aa9 commit 465d23e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: GNUmakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ test: fmtcheck
7272
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
7373

7474
testacc: fmtcheck
75-
TF_ACC_TERRAFORM_CACHE_DIR=/tmp TF_ACC_TERRAFORM_VERSION=1.1.7 TF_LOG=DEBUG TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
75+
TF_ACC_TERRAFORM_CACHE_DIR=/tmp TF_ACC_TERRAFORM_VERSION=1.1.7 TF_LOG=DEBUG TF_ACC=1 go test $(TEST) -v -json $(TESTARGS) -timeout 120m
7676

7777
vet:
7878
@echo "go vet ."

0 commit comments

Comments
 (0)