elliotchance / redismock

🕋 Mocking Redis in unit tests in Go.
MIT License
147 stars 24 forks source link

Make the library thread safe #39

Closed NefixEstrada closed 3 years ago

NefixEstrada commented 3 years ago

This commit makes the library thread safe by adding a local sync.Mutex in the mock client and implementing all themock.Mock methods that use the internal (and not published) sync.Mutex

Before this commit, all the tests run with the -race flag using this library would fail

Signed-off-by: Néfix Estrada nefixestrada@gmail.com


This change is Reviewable