From d2fb341419cc894f52da7797de9caddefb3f2abf Mon Sep 17 00:00:00 2001 From: Prateek Rungta Date: Tue, 25 Sep 2018 12:36:58 -0400 Subject: [PATCH] Cleanup TestConcurrentQueries --- src/m3ninx/search/proptest/concurrent_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/m3ninx/search/proptest/concurrent_test.go b/src/m3ninx/search/proptest/concurrent_test.go index 1ad1370058..19b091c8d3 100644 --- a/src/m3ninx/search/proptest/concurrent_test.go +++ b/src/m3ninx/search/proptest/concurrent_test.go @@ -65,13 +65,14 @@ func TestConcurrentQueries(t *testing.T) { require.NoError(t, err) var ( - wg sync.WaitGroup - errLock sync.Mutex - matchErr error + numConcurrentWorkers = 2 + wg sync.WaitGroup + errLock sync.Mutex + matchErr error ) - wg.Add(2) + wg.Add(numConcurrentWorkers) - for i := 0; i < 2; i++ { + for i := 0; i < numConcurrentWorkers; i++ { go func() { defer wg.Done() fstDocs, err := fstExec.Execute(q)