Skip to content

Commit

Permalink
fix some retry param
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Apr 15, 2021
1 parent 8e65fd1 commit 3e20198
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cdc/kv/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func newMockServiceSpecificAddr(

// waitRequestID waits request ID larger than the given allocated ID
func waitRequestID(c *check.C, allocatedID uint64) {
err := retry.Run(time.Millisecond*20, 10, func() error {
err := retry.Run(time.Millisecond*10, 20, func() error {
if currentRequestID() > allocatedID {
return nil
}
Expand Down Expand Up @@ -2767,7 +2767,6 @@ func (s *etcdSuite) testKVClientForceReconnect(c *check.C) {
// The second TiKV could start up slowly, which causes the kv client retries
// to TiKV for more than one time, so we can't determine the correct requestID
// here, we must use the real request ID received by TiKV server

err = retry.Run(time.Millisecond*300, 10, func() error {
_, ok := requestIds.Load(regionID3)
if ok {
Expand All @@ -2784,7 +2783,7 @@ func (s *etcdSuite) testKVClientForceReconnect(c *check.C) {
resolved := &cdcpb.ChangeDataEvent{Events: []*cdcpb.Event{
{
RegionId: regionID3,
RequestId: currentRequestID(),
RequestId: requestID.(uint64),
Event: &cdcpb.Event_ResolvedTs{ResolvedTs: 135},
},
}}
Expand Down

0 comments on commit 3e20198

Please sign in to comment.