diff options
| author | Bryan C. Mills <bcmills@google.com> | 2022-12-13 16:04:09 -0500 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-01-19 20:45:37 +0000 |
| commit | e49cb0208b17936f370753c820cb8dfef8d2bd5e (patch) | |
| tree | 1165682592889945b2f21999fbf01f9291be9f78 /src/os/timeout_test.go | |
| parent | f2884bf42317011371440d90805e63248d94c45d (diff) | |
| download | go-e49cb0208b17936f370753c820cb8dfef8d2bd5e.tar.xz | |
os: clean up tests
- Use testenv.Command instead of exec.Command to try to get more
useful timeout behavior.
- Parallelize tests that appear not to require global state.
(And add explanatory comments for a few that are not
parallelizable for subtle reasons.)
- Consolidate some “Helper” tests with their parent tests.
- Use t.TempDir instead of os.MkdirTemp when appropriate.
- Factor out subtests for repeated test helpers.
For #36107.
Updates #22315.
Change-Id: Ic24b6957094dcd40908a59f48e44c8993729222b
Reviewed-on: https://go-review.googlesource.com/c/go/+/458015
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/os/timeout_test.go')
| -rw-r--r-- | src/os/timeout_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os/timeout_test.go b/src/os/timeout_test.go index ff0d77a413..110b914e13 100644 --- a/src/os/timeout_test.go +++ b/src/os/timeout_test.go @@ -25,6 +25,7 @@ func TestNonpollableDeadline(t *testing.T) { if runtime.GOOS != "linux" { t.Skipf("skipping on %s", runtime.GOOS) } + t.Parallel() f, err := os.CreateTemp("", "ostest") if err != nil { |
