-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error message formatting #2615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix.
Some of them are false positives. Can you revert them? Thanks!
test/channelz_test.go
Outdated
@@ -355,7 +355,7 @@ func (s) TestCZServerSocketRegistrationAndDeletion(t *testing.T) { | |||
|
|||
ns, end := channelz.GetServerSockets(ss[0].ID, startID, c.max) | |||
if int64(len(ns)) != c.length || end != c.end { | |||
return false, fmt.Errorf("GetServerSockets(%d) = %+v (len of which: %d), end: %+v, want len(GetServerSockets(%d)) = %d, end: %+v", c.start, ns, len(ns), end, c.start, c.length, c.end) | |||
return false, fmt.Errorf("getServerSockets(%d) = %+v (len of which: %d), end: %+v, want len(GetServerSockets(%d)) = %d, end: %+v", c.start, ns, len(ns), end, c.start, c.length, c.end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this. GetServerSockets
is the function name.
test/channelz_test.go
Outdated
@@ -1320,14 +1320,14 @@ func (s) TestCZSocketGetSecurityValueTLS(t *testing.T) { | |||
return false, fmt.Errorf("the SocketData.Security is of type: %T, want: *credentials.TLSChannelzSecurityValue", skt.SocketData.Security) | |||
} | |||
if !reflect.DeepEqual(securityVal.RemoteCertificate, cert.Certificate[0]) { | |||
return false, fmt.Errorf("SocketData.Security.RemoteCertificate got: %v, want: %v", securityVal.RemoteCertificate, cert.Certificate[0]) | |||
return false, fmt.Errorf("socketData.Security.RemoteCertificate got: %v, want: %v", securityVal.RemoteCertificate, cert.Certificate[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert. SocketData
is the field name.
test/healthcheck_test.go
Outdated
@@ -312,7 +312,7 @@ func (s) TestHealthCheckWithGoAway(t *testing.T) { | |||
// make some rpcs to make sure connection is working. | |||
if err := verifyResultWithDelay(func() (bool, error) { | |||
if _, err := tc.EmptyCall(context.Background(), &testpb.Empty{}); err != nil { | |||
return false, fmt.Errorf("TestService/EmptyCall(_, _) = _, %v, want _, <nil>", err) | |||
return false, fmt.Errorf("testService/EmptyCall(_, _) = _, %v, want _, <nil>", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this file. TestService
is the service name.
test/rawConnWrapper.go
Outdated
@@ -222,7 +222,7 @@ func (rcw *rawConnWrapper) wantAnyFrame() (http2.Frame, error) { | |||
func (rcw *rawConnWrapper) encodeHeaderField(k, v string) error { | |||
err := rcw.hpackEnc.WriteField(hpack.HeaderField{Name: k, Value: v}) | |||
if err != nil { | |||
return fmt.Errorf("HPACK encoding error for %q/%q: %v", k, v, err) | |||
return fmt.Errorf("hPACK encoding error for %q/%q: %v", k, v, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert HPACK
.
Signed-off-by: CodeLingo Bot <[email protected]>
Signed-off-by: CodeLingo Bot <[email protected]>
Hi @menghanl , Shane from CodeLingo here. We stuffed up, sorry. We made an error when writing a Tenet that was used on your repository that resulted in incorrect changes to your code in some edge cases. We've fixed the bug and improved our internal process to prevent this happening again. We're keen to learn how we can best help dev teams without getting in your way. Your feedback would really help us, my email's [email protected]. Thanks, |
Use CodeLingo to automatically fix function comments following the
Code Review Comments guidelines.
This patch was generated by running the CodeLingo Rewrite Flow over the "go-error-fmt" Tenet. Note: the same Tenet can be used to automate PR reviews and generate contributor docs.
Install CodeLingo to drive Continuous Higher Standards
Learn about CodeLingo