diff --git a/consumer_test.go b/consumer_test.go index c9e6c62..f1edcd9 100644 --- a/consumer_test.go +++ b/consumer_test.go @@ -321,8 +321,12 @@ func (fc *fakeCheckpoint) Get(streamName, shardID string) (string, error) { // implementation of counter type fakeCounter struct { counter int64 + mu sync.Mutex } func (fc *fakeCounter) Add(streamName string, count int64) { + fc.mu.Lock() + defer fc.mu.Unlock() + fc.counter += count }