diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-13 04:38:48 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-13 04:38:48 +0900 |
| commit | 7638a44fa613f23434318bdf136723aa010e8638 (patch) | |
| tree | 7b5270ed4e9b6d7f1ee0f28c58d8077aa1d18005 /container/stub/exit_test.go | |
| parent | a14b6535a66cb7ac0fc4827f767ffaee0ce04b57 (diff) | |
treewide: parallel tests
Most tests already had no global state, however parallel was never enabled. This change enables it for all applicable tests.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/stub/exit_test.go')
| -rw-r--r-- | container/stub/exit_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/container/stub/exit_test.go b/container/stub/exit_test.go index 4e935ff4..15ad31f1 100644 --- a/container/stub/exit_test.go +++ b/container/stub/exit_test.go @@ -32,13 +32,20 @@ func (o *overrideTFailNow) Fail() { } func TestHandleExit(t *testing.T) { + t.Parallel() + t.Run("exit", func(t *testing.T) { + t.Parallel() defer stub.HandleExit(t) panic(stub.PanicExit) }) t.Run("goexit", func(t *testing.T) { + t.Parallel() + t.Run("FailNow", func(t *testing.T) { + t.Parallel() + ot := &overrideTFailNow{T: t} defer func() { if !ot.failNow { @@ -50,6 +57,8 @@ func TestHandleExit(t *testing.T) { }) t.Run("Fail", func(t *testing.T) { + t.Parallel() + ot := &overrideTFailNow{T: t} defer func() { if !ot.fail { @@ -62,11 +71,16 @@ func TestHandleExit(t *testing.T) { }) t.Run("nil", func(t *testing.T) { + t.Parallel() defer stub.HandleExit(t) }) t.Run("passthrough", func(t *testing.T) { + t.Parallel() + t.Run("toplevel", func(t *testing.T) { + t.Parallel() + defer func() { want := 0xcafebabe if r := recover(); r != want { @@ -79,6 +93,8 @@ func TestHandleExit(t *testing.T) { }) t.Run("new", func(t *testing.T) { + t.Parallel() + defer func() { want := 0xcafe if r := recover(); r != want { |
