-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Labels
concurrencypkg-suiteChange related to package testify/suiteChange related to package testify/suiterejected/duplicate
Description
I have several tests using testify/suite
and I execute them in parallel as follows
type IntegrationSuite struct {
suite.Suite
}
func TestIntegrationSuite(t *testing.T) {
suite.Run(t, &IntegrationSuite{})
}
func (is *IntegrationSuite) TestSomething() {
is.T().Log("\tIntegration Testing something")
for i := range myTestTable {
i := i
is.T().Run("Testing "+myTestTable[i].scenarioName, func(_ *testing.T) {
is.T().Parallel()
...
func (is *IntegrationSuite) TestSomethingElse() {
is.T().Log("\tIntegration Testing something else")
for i := range myOtherTestTable {
i := i
is.T().Run("Testing "+myOtherTestTable[i].scenarioName, func(_ *testing.T) {
is.T().Parallel()
...
})
However this panics with
panic: testing: t.Parallel called multiple times [recovered]
panic: testing: t.Parallel called multiple times
Metadata
Metadata
Assignees
Labels
concurrencypkg-suiteChange related to package testify/suiteChange related to package testify/suiterejected/duplicate