X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3400559165e50e3d62adf6d45f9970a13450d907..13f6d45704efc68ca8419e8917376aa44fdee1be:/services/keepstore/mock_mutex_for_test.go diff --git a/services/keepstore/mock_mutex_for_test.go b/services/keepstore/mock_mutex_for_test.go index e75d910587..daf0ef05f7 100644 --- a/services/keepstore/mock_mutex_for_test.go +++ b/services/keepstore/mock_mutex_for_test.go @@ -1,4 +1,8 @@ -package main +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +package keepstore type MockMutex struct { AllowLock chan struct{} @@ -7,17 +11,17 @@ type MockMutex struct { func NewMockMutex() *MockMutex { return &MockMutex{ - AllowLock: make(chan struct{}), + AllowLock: make(chan struct{}), AllowUnlock: make(chan struct{}), } } // Lock waits for someone to send to AllowLock. func (m *MockMutex) Lock() { - <- m.AllowLock + <-m.AllowLock } // Unlock waits for someone to send to AllowUnlock. func (m *MockMutex) Unlock() { - <- m.AllowUnlock + <-m.AllowUnlock }