Skip to content

Commit

Permalink
Merge pull request didi#26 from chenchunr/getTestPublic
Browse files Browse the repository at this point in the history
修改getTestPublic的错误返回信息
  • Loading branch information
lvan100 authored Oct 27, 2021
2 parents d4a6a2e + 78fc358 commit 25650fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions replayer-agent/logic/replayed/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var (
PublicLogFormatErr = errors.New("malformed public log")
PublicLogNotDefinedErr = errors.New("log path not defined")
PublicLogKeyNotDefinedErr = errors.New("key not defined")
PublicLogPathErr = errors.New("logpath not set")
)

type FormatDiff struct {
Expand Down
6 changes: 3 additions & 3 deletions replayer-agent/logic/replayed/replayed.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,17 +441,17 @@ func (c *Composer) getTestPublic(online string) (string, error) {
// key of public log
traceId, err := extractPublicKey(online, "trace_id=")
if err != nil {
return "", err
return "trace_id is not exist", err
}
opKey, err := extractPublicKey(online, "opera_stat_key=")
if err != nil {
return "", err
return "opera_stat_key is not exist", err
}

// path of public log
logPath := nuwaplt.GetValueWithProject(c.Project, nuwaplt.KLogPath, "")
if logPath == "" {
return "", PublicLogNotDefinedErr
return "logpath is not set", PublicLogPathErr
}

cnt, ok := c.PublogCnt[opKey]
Expand Down

0 comments on commit 25650fb

Please sign in to comment.