mirror of https://github.com/stretchr/testify.git
Change how tearDownAllSuite is run to aviod deadlock when running with failfast
parent
097ec799df
commit
cd58006fe6
|
@ -91,7 +91,7 @@ func Run(t *testing.T, suite TestingSuite) {
|
||||||
if _, ok := suite.(WithStats); ok {
|
if _, ok := suite.(WithStats); ok {
|
||||||
stats = newSuiteInformation()
|
stats = newSuiteInformation()
|
||||||
}
|
}
|
||||||
|
|
||||||
tests := []testing.InternalTest{}
|
tests := []testing.InternalTest{}
|
||||||
methodFinder := reflect.TypeOf(suite)
|
methodFinder := reflect.TypeOf(suite)
|
||||||
suiteName := methodFinder.Elem().Name()
|
suiteName := methodFinder.Elem().Name()
|
||||||
|
@ -160,7 +160,6 @@ func Run(t *testing.T, suite TestingSuite) {
|
||||||
}
|
}
|
||||||
tests = append(tests, test)
|
tests = append(tests, test)
|
||||||
}
|
}
|
||||||
|
|
||||||
if suiteSetupDone {
|
if suiteSetupDone {
|
||||||
defer func() {
|
defer func() {
|
||||||
if tearDownAllSuite, ok := suite.(TearDownAllSuite); ok {
|
if tearDownAllSuite, ok := suite.(TearDownAllSuite); ok {
|
||||||
|
|
Loading…
Reference in New Issue