Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
suite: fix deadlock in suite.Require()/Assert()
As pointed out in issue #1520, if the suite is not initialised properly (buy calling the Run function), then calling suite.Require() or suite.Assert() will result in a deadlock. This commit fixes that by panicking if the suite is not initialised properly. This is justified because, the suite is intended to be triggered in the right way. If the user does not do that, this panic will nudge them in the right direction. It has to be a panic because, at this point, we don't have access to any testing.T context to gracefully call a t.Fail(). Also, these two functions are not expected to return an error. Fixes #1520
- Loading branch information