Closed marcelloh closed 4 years ago
Hi, if you use the same db connection in separate go routines. Set the unordered matching option. You may also create separate db instances for each parallel coroutine if that is possible
I think, the New option gives me a new connection from the pool each time. (when I printed dsn, I saw that)
I think you mean to set this: mock.MatchExpectationsInOrder(false)
which I've tried, without success
It should be fine, maybe you are doing something wrong, if it invokes same query x times you have to expect it x times
I fixed it by changing the order of the commands :-)
It's raining expectation errors, so my question is: Is the mocking capable of handling concurrent (parallel) tests?