Update unit tests to use in-memory lock manager

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
Matthew Heon
2018-09-23 14:02:36 -04:00
committed by Matthew Heon
parent 35361595f3
commit 625c7e18ef
5 changed files with 573 additions and 549 deletions

View File

@ -84,7 +84,7 @@ func (m *InMemoryManager) AllocateLock() (Locker, error) {
// RetrieveLock retrieves a lock from the manager.
func (m *InMemoryManager) RetrieveLock(id uint32) (Locker, error) {
if id >= m.numLocks {
return nil, errors.Errorf("given lock ID %d is too large - this manager only supports lock indexes up to %d", id, m.numLocks - 1)
return nil, errors.Errorf("given lock ID %d is too large - this manager only supports lock indexes up to %d", id, m.numLocks-1)
}
return m.locks[id], nil