From 01372dc80e56d3ca8f59ab4cac4fcd3211170fa4 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Tue, 6 Aug 2024 13:52:18 +0800 Subject: [PATCH] typo Signed-off-by: Ryan Leung --- pkg/mcs/scheduling/server/config/config.go | 12 ++++++------ tests/integrations/mcs/discovery/register_test.go | 5 ----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/pkg/mcs/scheduling/server/config/config.go b/pkg/mcs/scheduling/server/config/config.go index 6f05f754293..4b855d09899 100644 --- a/pkg/mcs/scheduling/server/config/config.go +++ b/pkg/mcs/scheduling/server/config/config.go @@ -34,7 +34,7 @@ import ( "github.com/tikv/pd/pkg/cache" "github.com/tikv/pd/pkg/core/constant" "github.com/tikv/pd/pkg/core/storelimit" - mcsconstat "github.com/tikv/pd/pkg/mcs/utils/constant" + mcsconstant "github.com/tikv/pd/pkg/mcs/utils/constant" sc "github.com/tikv/pd/pkg/schedule/config" types "github.com/tikv/pd/pkg/schedule/type" "github.com/tikv/pd/pkg/slice" @@ -144,7 +144,7 @@ func (c *Config) adjust(meta *toml.MetaData) error { configutil.AdjustString(&c.AdvertiseListenAddr, c.ListenAddr) if !configMetaData.IsDefined("enable-grpc-gateway") { - c.EnableGRPCGateway = mcsconstat.DefaultEnableGRPCGateway + c.EnableGRPCGateway = mcsconstant.DefaultEnableGRPCGateway } c.adjustLog(configMetaData.Child("log")) @@ -152,7 +152,7 @@ func (c *Config) adjust(meta *toml.MetaData) error { return err } - configutil.AdjustInt64(&c.LeaderLease, mcsconstat.DefaultLeaderLease) + configutil.AdjustInt64(&c.LeaderLease, mcsconstant.DefaultLeaderLease) if err := c.Schedule.Adjust(configMetaData.Child("schedule"), false); err != nil { return err @@ -162,10 +162,10 @@ func (c *Config) adjust(meta *toml.MetaData) error { func (c *Config) adjustLog(meta *configutil.ConfigMetaData) { if !meta.IsDefined("disable-error-verbose") { - c.Log.DisableErrorVerbose = mcsconstat.DefaultDisableErrorVerbose + c.Log.DisableErrorVerbose = mcsconstant.DefaultDisableErrorVerbose } - configutil.AdjustString(&c.Log.Format, mcsconstat.DefaultLogFormat) - configutil.AdjustString(&c.Log.Level, mcsconstat.DefaultLogLevel) + configutil.AdjustString(&c.Log.Format, mcsconstant.DefaultLogFormat) + configutil.AdjustString(&c.Log.Level, mcsconstant.DefaultLogLevel) } // GetName returns the Name diff --git a/tests/integrations/mcs/discovery/register_test.go b/tests/integrations/mcs/discovery/register_test.go index b693bb68804..ce019b29da8 100644 --- a/tests/integrations/mcs/discovery/register_test.go +++ b/tests/integrations/mcs/discovery/register_test.go @@ -72,14 +72,9 @@ func (suite *serverRegisterTestSuite) TearDownSuite() { } func (suite *serverRegisterTestSuite) TestServerRegister() { - // test register, primary and unregister when start tso and resource-manager with only one server for i := 0; i < 3; i++ { suite.checkServerRegister(constant.TSOServiceName) } - // TODO: uncomment after resource-manager is ready - // for i := 0; i < 3; i++ { - // suite.checkServerRegister(constant.ResourceManagerServiceName) - // } } func (suite *serverRegisterTestSuite) checkServerRegister(serviceName string) {