diff --git a/godog_and_gomega_helpers.go b/godog_and_gomega_helpers.go index 98cf166..ae90ef9 100644 --- a/godog_and_gomega_helpers.go +++ b/godog_and_gomega_helpers.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "strconv" + "time" . "github.com/onsi/gomega" ) @@ -43,3 +44,11 @@ func Atof(in string) float64 { Ok(err) return res } + +func SetTestDeadlockProtection() { + go checkTestTimeout(1 * time.Second) +} +func checkTestTimeout(t time.Duration) { + <-time.After(t) + panic("Test Suite Timeout") +}