diff --git a/server/api/region_test.go b/server/api/region_test.go index f13f84551203..e6878399a1ce 100644 --- a/server/api/region_test.go +++ b/server/api/region_test.go @@ -464,7 +464,7 @@ func TestRegionsWithKillRequest(t *testing.T) { addr := svr.GetAddr() url := fmt.Sprintf("%s%s/api/v1/regions", addr, apiPrefix) mustBootstrapCluster(re, svr) - regionCount := 200000 + regionCount := 50000 for i := 0; i < regionCount; i++ { r := core.NewTestRegionInfo(uint64(i+2), 1, []byte(fmt.Sprintf("%09d", i)), @@ -483,8 +483,8 @@ func TestRegionsWithKillRequest(t *testing.T) { re.Contains(err.Error(), "context canceled") respCh <- resp }() - time.Sleep(200 * time.Millisecond) // wait for the request to be sent - cancel() // close the request + time.Sleep(50 * time.Millisecond) // wait for the request to be sent + cancel() // close the request resp := <-respCh re.Nil(resp) }