Skip to content

Commit

Permalink
[logging_no_breaking_line] fix test. behavior change???
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Oct 8, 2021
1 parent 8d3c26d commit b3fc55b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grpclog/loggerv2_test.go
Expand Up @@ -54,7 +54,7 @@ func TestLoggerV2Severity(t *testing.T) {
// check if b is in the format of:
// WARNING: 2017/04/07 14:55:42 WARNING
func checkLogForSeverity(s int, b []byte) error {
expected := regexp.MustCompile(fmt.Sprintf(`^%s: [0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} %s\n$`, severityName[s], severityName[s]))
expected := regexp.MustCompile(fmt.Sprintf(`^[0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} %s: %s\n$`, severityName[s], severityName[s]))
if m := expected.Match(b); !m {
return fmt.Errorf("got: %v, want string in format of: %v", string(b), severityName[s]+": 2016/10/05 17:09:26 "+severityName[s])
}
Expand Down

0 comments on commit b3fc55b

Please sign in to comment.