diff options
| author | Shulhan <ms@kilabit.info> | 2025-01-22 21:20:33 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-01-22 21:34:16 +0700 |
| commit | cdf43c8a97f6fbe7548aa45d3ce2680bdeb70e36 (patch) | |
| tree | 8318d9973141368af878846c8397097c27741e36 | |
| parent | 18d3a3aad4b6ad3358159d48cd158c2cb2c71e5a (diff) | |
| download | pakakeh.go-cdf43c8a97f6fbe7548aa45d3ce2680bdeb70e36.tar.xz | |
lib/play: use [T.Error] instead of [T.Fatal] on non-test goroutine
Using [T.Fatal] on non-test goroutines is not recommended and caught by
go vet.
| -rw-r--r-- | lib/play/play_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/play/play_test.go b/lib/play/play_test.go index 59c6eaba..bf1f36b1 100644 --- a/lib/play/play_test.go +++ b/lib/play/play_test.go @@ -134,7 +134,6 @@ func TestGo_Run_Overlap(t *testing.T) { runwg.Add(1) go testRunOverlap(t, &runwg, tdata, `run2`, sid) - runwg.Wait() // The cmd1 Run should have been killed. @@ -164,7 +163,8 @@ func testRunOverlap(t *testing.T, runwg *sync.WaitGroup, tdata *test.Data, Root: t.TempDir(), }) if err != nil { - t.Fatal(err) + t.Error(err) + return } var req = &Request{ |
