Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Jun 8, 2021
1 parent b3f117d commit d12bc1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cdc/kv/token_region_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (s *tokenRegionSuite) TestRouterWithMultiStores(c *check.C) {
r := NewSizedRegionRouter(context.Background(), limit)

for _, store := range stores {
for j := 0; j < limit*5; j++ {
for j := 0; j < limit*2; j++ {
r.AddRegion(singleRegionInfo{ts: uint64(j), rpcCtx: &tikv.RPCContext{Addr: store}})
}
}
Expand All @@ -159,7 +159,7 @@ func (s *tokenRegionSuite) TestRouterWithMultiStores(c *check.C) {
r.Acquire(store)
atomic.AddUint64(&received, 1)
r.Release(store)
if atomic.LoadUint64(&received) == uint64(limit*10) {
if atomic.LoadUint64(&received) == uint64(limit*4*storeN) {
cancel()
}
}
Expand All @@ -168,7 +168,7 @@ func (s *tokenRegionSuite) TestRouterWithMultiStores(c *check.C) {
}

for _, store := range stores {
for i := 0; i < limit*5; i++ {
for i := 0; i < limit*2; i++ {
r.AddRegion(singleRegionInfo{ts: uint64(i), rpcCtx: &tikv.RPCContext{Addr: store}})
}
}
Expand Down

0 comments on commit d12bc1b

Please sign in to comment.