Add parallel test scenario in README
Closed this issue · 1 comments
CyganFx commented
Hi, when one executes tests in parallel with t.Parallel()
, and does something like: defer mockController.Finish()
(similar with Wait(<duration>)
) controller fails to recognize that some of mocks' Expect/Return and other patterns are not used. Without parallel tests, there would be error like: 'Expected to call .GetMock ...'
To fix that, you need to use Cleanup
method of testing.T
and inside it call whether Finish
or Wait
.
Could be implemented like in this issue #62
I think it'd be useful to add it in README, as go official docs aren't much informative