Change how tearDownAllSuite is run to aviod deadlock when running with failfast

pull/943/head
ariley 2020-04-20 20:16:18 +01:00 committed by Boyan Soubachov
parent 097ec799df
commit cd58006fe6
1 changed files with 1 additions and 2 deletions

View File

@ -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 {