cleanup: remove staticcheck exception (#2582)
This commit is contained in:
@ -109,7 +109,9 @@ func (h *testStreamHandler) handleStream(t *testing.T, s *Stream) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !bytes.Equal(p, req) {
|
if !bytes.Equal(p, req) {
|
||||||
t.Fatalf("handleStream got %v, want %v", p, req)
|
t.Errorf("handleStream got %v, want %v", p, req)
|
||||||
|
h.t.WriteStatus(s, status.New(codes.Internal, "panic"))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
// send a response back to the client.
|
// send a response back to the client.
|
||||||
h.t.Write(s, nil, resp, &Options{})
|
h.t.Write(s, nil, resp, &Options{})
|
||||||
@ -125,12 +127,16 @@ func (h *testStreamHandler) handleStreamPingPong(t *testing.T, s *Stream) {
|
|||||||
h.t.WriteStatus(s, status.New(codes.OK, ""))
|
h.t.WriteStatus(s, status.New(codes.OK, ""))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
t.Fatalf("Error on server while reading data header: %v", err)
|
t.Errorf("Error on server while reading data header: %v", err)
|
||||||
|
h.t.WriteStatus(s, status.New(codes.Internal, "panic"))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
sz := binary.BigEndian.Uint32(header[1:])
|
sz := binary.BigEndian.Uint32(header[1:])
|
||||||
msg := make([]byte, int(sz))
|
msg := make([]byte, int(sz))
|
||||||
if _, err := s.Read(msg); err != nil {
|
if _, err := s.Read(msg); err != nil {
|
||||||
t.Fatalf("Error on server while reading message: %v", err)
|
t.Errorf("Error on server while reading message: %v", err)
|
||||||
|
h.t.WriteStatus(s, status.New(codes.Internal, "panic"))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
buf := make([]byte, sz+5)
|
buf := make([]byte, sz+5)
|
||||||
buf[0] = byte(0)
|
buf[0] = byte(0)
|
||||||
@ -143,7 +149,9 @@ func (h *testStreamHandler) handleStreamPingPong(t *testing.T, s *Stream) {
|
|||||||
func (h *testStreamHandler) handleStreamMisbehave(t *testing.T, s *Stream) {
|
func (h *testStreamHandler) handleStreamMisbehave(t *testing.T, s *Stream) {
|
||||||
conn, ok := s.st.(*http2Server)
|
conn, ok := s.st.(*http2Server)
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatalf("Failed to convert %v to *http2Server", s.st)
|
t.Errorf("Failed to convert %v to *http2Server", s.st)
|
||||||
|
h.t.WriteStatus(s, status.New(codes.Internal, ""))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
var sent int
|
var sent int
|
||||||
p := make([]byte, http2MaxFrameLen)
|
p := make([]byte, http2MaxFrameLen)
|
||||||
|
1
vet.sh
1
vet.sh
@ -132,7 +132,6 @@ balancer/roundrobin/roundrobin_test.go:SA1019
|
|||||||
benchmark/benchmain/main.go:SA1019
|
benchmark/benchmain/main.go:SA1019
|
||||||
internal/transport/handler_server.go:SA1019
|
internal/transport/handler_server.go:SA1019
|
||||||
internal/transport/handler_server_test.go:SA1019
|
internal/transport/handler_server_test.go:SA1019
|
||||||
internal/transport/transport_test.go:SA2002
|
|
||||||
stats/stats_test.go:SA1019
|
stats/stats_test.go:SA1019
|
||||||
test/channelz_test.go:SA1019
|
test/channelz_test.go:SA1019
|
||||||
test/end2end_test.go:SA1019
|
test/end2end_test.go:SA1019
|
||||||
|
Reference in New Issue
Block a user