From cd58006fe60b8ead9b2172ac361b197f476de83c Mon Sep 17 00:00:00 2001 From: ariley Date: Mon, 20 Apr 2020 20:16:18 +0100 Subject: [PATCH] Change how tearDownAllSuite is run to aviod deadlock when running with failfast --- suite/suite.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/suite/suite.go b/suite/suite.go index ec8d1ef..b9b5d1c 100644 --- a/suite/suite.go +++ b/suite/suite.go @@ -91,7 +91,7 @@ func Run(t *testing.T, suite TestingSuite) { if _, ok := suite.(WithStats); ok { stats = newSuiteInformation() } - + tests := []testing.InternalTest{} methodFinder := reflect.TypeOf(suite) suiteName := methodFinder.Elem().Name() @@ -160,7 +160,6 @@ func Run(t *testing.T, suite TestingSuite) { } tests = append(tests, test) } - if suiteSetupDone { defer func() { if tearDownAllSuite, ok := suite.(TearDownAllSuite); ok {