Skip to content

Commit

Permalink
fix race
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <[email protected]>
  • Loading branch information
nolouch committed Jul 5, 2024
1 parent 7e8945e commit 503b4e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/resource_group/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ func TestControllerWithTwoGroupRequestConcurrency(t *testing.T) {
// wait default group request token by PeriodicReport.
time.Sleep(2 * time.Second)
counter := c2.run.requestUnitTokens[0]
counter.limiter.mu.Lock()
counter.limiter.notify()
counter.limiter.mu.Unlock()
select {
case res := <-recTestGroupAcquireTokenRequest:
re.True(res)
Expand Down

0 comments on commit 503b4e0

Please sign in to comment.