Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Dec 10, 2024
1 parent c1a9697 commit 8f61eaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/integrations/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2070,15 +2070,15 @@ func TestCircuitBreaker(t *testing.T) {
cli := setupCli(ctx, re, endpoints, opt.WithRegionMetaCircuitBreaker(circuitBreakerSettings))
defer cli.Close()

for i := 0; i < 10; i++ {
for range 10 {
region, err := cli.GetRegion(context.TODO(), []byte("a"))
re.NoError(err)
re.NotNil(region)
}

re.NoError(failpoint.Enable("github.com/tikv/pd/client/triggerCircuitBreaker", "return(true)"))

for i := 0; i < 100; i++ {
for range 100 {
_, err := cli.GetRegion(context.TODO(), []byte("a"))
re.Error(err)
}
Expand All @@ -2095,7 +2095,7 @@ func TestCircuitBreaker(t *testing.T) {
// wait cooldown
time.Sleep(time.Second)

for i := 0; i < 10; i++ {
for range 10 {
region, err := cli.GetRegion(context.TODO(), []byte("a"))
re.NoError(err)
re.NotNil(region)
Expand Down Expand Up @@ -2123,15 +2123,15 @@ func TestCircuitBreakerChangeSettings(t *testing.T) {
cli := setupCli(ctx, re, endpoints, opt.WithRegionMetaCircuitBreaker(circuitBreakerSettings))
defer cli.Close()

for i := 0; i < 10; i++ {
for range 10 {
region, err := cli.GetRegion(context.TODO(), []byte("a"))
re.NoError(err)
re.NotNil(region)
}

re.NoError(failpoint.Enable("github.com/tikv/pd/client/triggerCircuitBreaker", "return(true)"))

for i := 0; i < 100; i++ {
for range 100 {
_, err := cli.GetRegion(context.TODO(), []byte("a"))
re.Error(err)
}
Expand Down

0 comments on commit 8f61eaf

Please sign in to comment.