From 6ca619ef05d658ffc07f490c560d631ac9b57d9d Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Thu, 7 Oct 2021 21:25:25 -0700 Subject: [PATCH] [logging_no_breaking_line] fix test. behavior change??? --- grpclog/loggerv2_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grpclog/loggerv2_test.go b/grpclog/loggerv2_test.go index 756f215f9c8..0b2c8b23d66 100644 --- a/grpclog/loggerv2_test.go +++ b/grpclog/loggerv2_test.go @@ -52,9 +52,9 @@ func TestLoggerV2Severity(t *testing.T) { } // check if b is in the format of: -// WARNING: 2017/04/07 14:55:42 WARNING +// 2017/04/07 14:55:42 WARNING: 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]) }