From 094b6f974f070a44fa27d41ae93066a985177457 Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Sun, 6 Mar 2022 00:23:05 +0100 Subject: [PATCH] run test with race condition detector --- Makefile | 2 +- parallel/slice.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5c7a3406..11b09cd2 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ build: test: go test -race -v ./... watch-test: - reflex -R assets.go -t 50ms -s -- sh -c 'gotest -v ./...' + reflex -R assets.go -t 50ms -s -- sh -c 'gotest -race -v ./...' bench: go test -benchmem -count 3 -bench ./... diff --git a/parallel/slice.go b/parallel/slice.go index 333c8eed..34e17794 100644 --- a/parallel/slice.go +++ b/parallel/slice.go @@ -116,7 +116,6 @@ func PartitionBy[T any, K comparable](collection []T, iteratee func (x T) K) [][ for _, item := range collection { go func(_item T) { - defer wg.Done() key := iteratee(_item) mu.Lock()