Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <admin@liudos.us>
  • Loading branch information
lhy1024 committed Nov 21, 2023
1 parent 0dfc784 commit 56e08d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/apiutil/serverapi/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ func (h *redirector) matchMicroServiceRedirectRules(r *http.Request) (bool, stri
} else {
r.URL.Path = rule.targetPath
}
log.Info("redirect to micro service", zap.String("path", r.URL.Path), zap.String("origin-path", origin),
zap.String("target", addr), zap.String("method", r.Method), zap.Any("query", r.URL.Query()))
log.Debug("redirect to micro service", zap.String("path", r.URL.Path), zap.String("origin-path", origin),
zap.String("target", addr), zap.String("method", r.Method))
return true, addr
}
}
Expand Down
14 changes: 8 additions & 6 deletions tests/pdctl/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,18 +646,20 @@ func TestForwardSchedulerRequest(t *testing.T) {
server := cluster.GetLeaderServer()
re.NoError(server.BootstrapCluster())
backendEndpoints := server.GetAddr()
tc, err := tests.NewTestSchedulingCluster(ctx, 2, backendEndpoints)
tc, err := tests.NewTestSchedulingCluster(ctx, 1, backendEndpoints)
re.NoError(err)
defer tc.Destroy()
tc.WaitForPrimaryServing(re)

cmd := pdctlCmd.GetRootCmd()
args := []string{"-u", backendEndpoints, "scheduler", "show"}
var slice []string
output, err := pdctl.ExecuteCommand(cmd, args...)
re.NoError(err)
re.NoError(json.Unmarshal(output, &slice))
re.Contains(slice, "balance-leader-scheduler")
var sches []string
testutil.Eventually(re, func() bool {
output, err := pdctl.ExecuteCommand(cmd, args...)
re.NoError(err)
re.NoError(json.Unmarshal(output, &sches))
return slice.Contains(sches, "balance-leader-scheduler")
})

mustUsage := func(args []string) {
output, err := pdctl.ExecuteCommand(cmd, args...)
Expand Down

0 comments on commit 56e08d7

Please sign in to comment.