Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Nov 15, 2023
1 parent 52858a1 commit 464876f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/api/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func newRateLimitMiddleware(s *server.Server) negroni.Handler {
return &rateLimitMiddleware{svr: s}
}

// ServeHTTP is used to implememt negroni.Handler for rateLimitMiddleware
// ServeHTTP is used to implement negroni.Handler for rateLimitMiddleware
func (s *rateLimitMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
if !s.svr.GetServiceMiddlewarePersistOptions().IsRateLimitEnabled() {
next(w, r)
Expand Down
2 changes: 1 addition & 1 deletion server/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ func (c *RaftCluster) Stop() {
c.Unlock()

c.wg.Wait()
log.Info("raftcluster is stopped")
log.Info("raft cluster is stopped")
}

// IsRunning return if the cluster is running.
Expand Down
3 changes: 2 additions & 1 deletion tests/integrations/mcs/scheduling/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ func (suite *configTestSuite) TestSchedulerConfigWatch() {
)
re.NoError(err)
// Get all default scheduler names.
var namesFromAPIServer, _, _ = suite.pdLeaderServer.GetRaftCluster().GetStorage().LoadAllSchedulerConfigs()
var namesFromAPIServer []string
testutil.Eventually(re, func() bool {
namesFromAPIServer, _, _ = suite.pdLeaderServer.GetRaftCluster().GetStorage().LoadAllSchedulerConfigs()
return len(namesFromAPIServer) == len(sc.DefaultSchedulers)
})
// Check all default schedulers' configs.
Expand Down

0 comments on commit 464876f

Please sign in to comment.