]> Cypherpunks repositories - gostls13.git/commit
cmd/go: remove arbitrary sleep in TestScript/test_chatty_parallel_success_sleepy
authorBryan C. Mills <bcmills@google.com>
Wed, 16 Feb 2022 15:01:20 +0000 (10:01 -0500)
committerBryan Mills <bcmills@google.com>
Wed, 30 Mar 2022 19:14:04 +0000 (19:14 +0000)
commit1ac16586421070cdc76c62b5dfd5e74a4b47fca8
tree5471ba1cdb41fe7607e6fb33a8d75949f98e6b91
parentca1e509552cab36072016de44234f30072b9e703
cmd/go: remove arbitrary sleep in TestScript/test_chatty_parallel_success_sleepy

(Also rename it to no longer describe itself in terms of sleeping.)

This test previously relied on the scheduler to wake up a goroutine to
write the "--- PASS: TestFast" line within 100ms of TestFast actually
finishing. On some platforms, even that long a delay is apparently too
short.

Instead, we now use a deterministic "=== RUN" line instead of a
timing-dependent "--- PASS" line to interrupt the output.

Fixes #51221

Change-Id: I3997640fb7577e29e3866a82d4d49a3a70a4b033
Reviewed-on: https://go-review.googlesource.com/c/go/+/386154
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/testdata/script/test_chatty_parallel_success_run.txt [new file with mode: 0644]
src/cmd/go/testdata/script/test_chatty_parallel_success_sleepy.txt [deleted file]