Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Aug 12, 2024
1 parent 064e8f7 commit 01372dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 6 additions & 6 deletions pkg/mcs/scheduling/server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -144,15 +144,15 @@ 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"))
if err := c.Security.Encryption.Adjust(); err != nil {
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
Expand All @@ -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
Expand Down
5 changes: 0 additions & 5 deletions tests/integrations/mcs/discovery/register_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 01372dc

Please sign in to comment.