Skip to content

Commit

Permalink
chore: fix TestBreakerConcurrent ci
Browse files Browse the repository at this point in the history
  • Loading branch information
joway committed Jul 26, 2024
1 parent c388956 commit 098c104
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cloud/circuitbreaker/breaker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,10 @@ func TestBreakerConcurrent(t *testing.T) {
var wg sync.WaitGroup
pass := int32(0)
fail := int32(0)
for i := 0; i < 50; i++ {
if b.IsAllowed() {
atomic.AddInt32(&pass, 1)
}
for i := 0; i < 49; i++ {
wg.Add(1)
go func() {
defer wg.Done()
Expand Down

0 comments on commit 098c104

Please sign in to comment.