Skip to content

Commit 221dbe5

Browse files
everdanceglesica
authored andcommitted
fix mutex
1 parent 1bb3d5a commit 221dbe5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mock/mock.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ func (m *Mock) MethodCalled(methodName string, arguments ...interface{}) Argumen
350350
if found < 0 {
351351
// expected call found but it has already been called with repeatable times
352352
if call != nil {
353+
m.mutex.Unlock()
353354
m.fail("\nassert: mock: The method has been called over %d times.\n\tEither do one more Mock.On(\"%s\").Return(...), or remove extra call.\n\tThis call was unexpected:\n\t\t%s\n\tat: %s", call.totalCalls, methodName, callString(methodName, arguments, true), assert.CallerInfo())
354355
}
355356
// we have to fail here - because we don't know what to do

0 commit comments

Comments
 (0)