Use go 1.25 waitgroup Go method instead of Add/Wait (#3265)
* Use go 1.25 waitgroup Go method instead of Add/Wait Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Disable java builder test for now Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> --------- Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -48,16 +48,14 @@ func TestQueuePushWithConcurrentRequest(t *testing.T) {
|
||||
q := NewQueue()
|
||||
noOfRequests := 20
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(noOfRequests)
|
||||
for i := 0; i < noOfRequests; i++ {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
item := &svcWait{
|
||||
svcChannel: make(chan *FuncSvc),
|
||||
ctx: nil,
|
||||
}
|
||||
q.Push(item)
|
||||
}()
|
||||
})
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
Reference in New Issue
Block a user