Skip to content

Commit

Permalink
[chore] Remove redundant wait group from a test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax committed May 30, 2024
1 parent ff6f029 commit b73a349
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions exporter/exporterhelper/batch_sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,16 +458,12 @@ func TestBatchSender_ShutdownDeadlock(t *testing.T) {

sink := newFakeRequestSink()

// Send 10 concurrent requests and wait for them to start
startWG := sync.WaitGroup{}
// Send 10 concurrent requests
for i := 0; i < 10; i++ {
startWG.Add(1)
go func() {
startWG.Done()
require.NoError(t, be.send(context.Background(), &fakeRequest{items: 4, sink: sink}))
}()
}
startWG.Wait()

// Wait for at least one batch to enter the merge function
<-waitMerge
Expand Down

0 comments on commit b73a349

Please sign in to comment.