diff --git a/pkg/lockservice/rpc_test.go b/pkg/lockservice/rpc_test.go index ed70df67daf2..286d98c60644 100644 --- a/pkg/lockservice/rpc_test.go +++ b/pkg/lockservice/rpc_test.go @@ -210,7 +210,7 @@ func TestMOErrorCanHandled(t *testing.T) { writeResponse(ctx, getLogger(""), cancel, resp, moerr.NewDeadLockDetectedNoCtx(), cs) }) - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*100) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) defer cancel() resp, err := c.Send(ctx, &lock.Request{ LockTable: lock.LockTable{ServiceID: "s1"}, @@ -315,7 +315,7 @@ func TestLockTableBindChanged(t *testing.T) { writeResponse(ctx, getLogger(""), cancel, resp, nil, cs) }) - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*100) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) defer cancel() resp, err := c.Send(ctx, &lock.Request{ LockTable: lock.LockTable{ServiceID: "s1"}, diff --git a/pkg/lockservice/service_remote_test.go b/pkg/lockservice/service_remote_test.go index f516f02ccf78..b1192ebc5d62 100644 --- a/pkg/lockservice/service_remote_test.go +++ b/pkg/lockservice/service_remote_test.go @@ -597,8 +597,8 @@ func runBindChangedTests( fn(ctx, alloc, l1, l2, table1) }, func(c *Config) { - c.KeepBindDuration.Duration = time.Millisecond * 50 - c.KeepRemoteLockDuration.Duration = time.Millisecond * 50 + c.KeepBindDuration.Duration = time.Second + c.KeepRemoteLockDuration.Duration = time.Second c.RPC.BackendOptions = append(c.RPC.BackendOptions, morpc.WithBackendFilter(func(m morpc.Message, s string) bool { diff --git a/pkg/lockservice/service_test.go b/pkg/lockservice/service_test.go index aec27d7eb7bb..f0a8b41b03b7 100644 --- a/pkg/lockservice/service_test.go +++ b/pkg/lockservice/service_test.go @@ -2065,7 +2065,7 @@ func TestIssue16121(t *testing.T) { t, zapcore.DebugLevel, []string{"s1", "s2"}, - time.Second*1, + time.Second*10, func(alloc *lockTableAllocator, s []*service) { l1 := s[0] l2 := s[1] @@ -2120,7 +2120,7 @@ func TestReLockSuccWithBindChanged(t *testing.T) { t, zapcore.DebugLevel, []string{"s1", "s2"}, - time.Second*1, + time.Second*10, func(alloc *lockTableAllocator, s []*service) { l1 := s[0] l2 := s[1]