testify/mock
Dan Heller 2aa2c176b9 Fix unprotected call fields access in MethodCalled()
This change fixes a race condition I discovered when a multithreaded
test in a service I work on failed under -race. The included test case
simulates that failure (concurrent mutation of a Call with invocations
on the mock). The test will fail with a data race if run under the
race detector; the new locking ensures that call fields are not
accessed without the protection of the parent mutex.
2017-10-17 22:22:57 -07:00
..
doc.go Fix most golint warnings 2016-01-09 19:30:22 +01:00
mock.go Fix unprotected call fields access in MethodCalled() 2017-10-17 22:22:57 -07:00
mock_test.go Fix unprotected call fields access in MethodCalled() 2017-10-17 22:22:57 -07:00