I'm currently running multiple tests in Parallel using Go subtests. Something like this -
func TestGroupedParallel(t *testing.T) {
for _, tc := range testCases {
tc := tc // capture range variable
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()
if got := foo(tc.in); got != tc.out {
t.Errorf("got %v; want %v", got, tc.out)
}
...
})
}
}
When I use the timeout flag, it kills all the tests running in parallel. Is there any way I can have timeout for each subtest? Thanks!