From 825309962fd6d8e34f7f38f51c4994395826d139 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Thu, 31 Mar 2022 11:03:00 -0400 Subject: [PATCH] cmd/go: allow either test to complete first in TestScript/test_chatty_parallel_success_run This fixes a failure mode observed in https://build.golang.org/log/7b28a914b1914dabe94f7c4e36ad6466ebd4de5d, in which the expected CONT lines are present but the test completions are reported in a different (but valid) order. CONT lines are only printed between interleaved output lines, so if the ordering of the tests swaps after all output is already generated the PASS lines can be in arbitrary order. Fixes #51221 (again). Change-Id: I051f8ec4331e2e3ab1bb00a7c188c322ad4e0a03 Reviewed-on: https://go-review.googlesource.com/c/go/+/397194 Trust: Bryan Mills Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- src/cmd/go/testdata/script/test_chatty_parallel_success_run.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/testdata/script/test_chatty_parallel_success_run.txt b/src/cmd/go/testdata/script/test_chatty_parallel_success_run.txt index b0f4cc1977..4e0f239a66 100644 --- a/src/cmd/go/testdata/script/test_chatty_parallel_success_run.txt +++ b/src/cmd/go/testdata/script/test_chatty_parallel_success_run.txt @@ -2,7 +2,7 @@ # multiple parallel outputs have the appropriate CONT lines between them. go test -parallel 3 chatty_parallel -v -stdout '=== RUN TestInterruptor/interruption\n=== CONT TestLog\n chatty_parallel_test.go:28: this is the second TestLog log\n--- PASS: TestLog \([0-9.]{4}s\)' +stdout '=== RUN TestInterruptor/interruption\n=== CONT TestLog\n chatty_parallel_test.go:28: this is the second TestLog log\n--- PASS: Test(Log|Interruptor) \([0-9.]{4}s\)' -- go.mod -- module chatty_parallel -- 2.48.1