Skip to content

Commit 760419a

Browse files
authored
chore: Refactor agent tests to avoid t.Run when not needed (#5376)
It turns out that writing tests that contain subtests should probably be limited to table-based tests and tests that share a common setup shared between tests. Writing tests with a subtest like this: ``` func TestSomething(t *testing.T) { t.Run("Subtest", func(t *testing.t) {}) } ``` Has the following disadvantages: - It can lead to multiple tests failing with `(unknown)` status when only one of the subtests hang (never exit) - In Go 1.20rc1, using `t.Setenv` is no longer allowed if the parent test is parallel
1 parent 08a6a18 commit 760419a

File tree

2 files changed

+698
-708
lines changed

2 files changed

+698
-708
lines changed

0 commit comments

Comments
 (0)