@@ -1685,7 +1685,7 @@ func testFailedServerStreaming(t *testing.T, e env) {
1685
1685
1686
1686
// concurrentSendServer is a TestServiceServer whose
1687
1687
// StreamingOutputCall makes ten serial Send calls, sending payloads
1688
- // "0".."9", inclusive. TestServerStreaming_Concurrent verifies they
1688
+ // "0".."9", inclusive. TestServerStreamingConcurrent verifies they
1689
1689
// were received in the correct order, and that there were no races.
1690
1690
//
1691
1691
// All other TestServiceServer methods crash if called.
@@ -1705,14 +1705,14 @@ func (s concurrentSendServer) StreamingOutputCall(args *testpb.StreamingOutputCa
1705
1705
}
1706
1706
1707
1707
// Tests doing a bunch of concurrent streaming output calls.
1708
- func TestServerStreaming_Concurrent (t * testing.T ) {
1708
+ func TestServerStreamingConcurrent (t * testing.T ) {
1709
1709
defer leakCheck (t )()
1710
1710
for _ , e := range listTestEnv () {
1711
- testServerStreaming_Concurrent (t , e )
1711
+ testServerStreamingConcurrent (t , e )
1712
1712
}
1713
1713
}
1714
1714
1715
- func testServerStreaming_Concurrent (t * testing.T , e env ) {
1715
+ func testServerStreamingConcurrent (t * testing.T , e env ) {
1716
1716
te := newTest (t , e )
1717
1717
te .startServer (concurrentSendServer {})
1718
1718
defer te .tearDown ()
@@ -2160,14 +2160,14 @@ func (s *funcServer) StreamingInputCall(stream testpb.TestService_StreamingInput
2160
2160
return s .streamingInputCall (stream )
2161
2161
}
2162
2162
2163
- func TestClientRequestBodyError_UnexpectedEOF (t * testing.T ) {
2163
+ func TestClientRequestBodyErrorUnexpectedEOF (t * testing.T ) {
2164
2164
defer leakCheck (t )()
2165
2165
for _ , e := range listTestEnv () {
2166
- testClientRequestBodyError_UnexpectedEOF (t , e )
2166
+ testClientRequestBodyErrorUnexpectedEOF (t , e )
2167
2167
}
2168
2168
}
2169
2169
2170
- func testClientRequestBodyError_UnexpectedEOF (t * testing.T , e env ) {
2170
+ func testClientRequestBodyErrorUnexpectedEOF (t * testing.T , e env ) {
2171
2171
te := newTest (t , e )
2172
2172
ts := & funcServer {unaryCall : func (ctx context.Context , in * testpb.SimpleRequest ) (* testpb.SimpleResponse , error ) {
2173
2173
errUnexpectedCall := errors .New ("unexpected call func server method" )
@@ -2184,14 +2184,14 @@ func testClientRequestBodyError_UnexpectedEOF(t *testing.T, e env) {
2184
2184
})
2185
2185
}
2186
2186
2187
- func TestClientRequestBodyError_CloseAfterLength (t * testing.T ) {
2187
+ func TestClientRequestBodyErrorCloseAfterLength (t * testing.T ) {
2188
2188
defer leakCheck (t )()
2189
2189
for _ , e := range listTestEnv () {
2190
- testClientRequestBodyError_CloseAfterLength (t , e )
2190
+ testClientRequestBodyErrorCloseAfterLength (t , e )
2191
2191
}
2192
2192
}
2193
2193
2194
- func testClientRequestBodyError_CloseAfterLength (t * testing.T , e env ) {
2194
+ func testClientRequestBodyErrorCloseAfterLength (t * testing.T , e env ) {
2195
2195
te := newTest (t , e )
2196
2196
te .declareLogNoise ("Server.processUnaryRPC failed to write status" )
2197
2197
ts := & funcServer {unaryCall : func (ctx context.Context , in * testpb.SimpleRequest ) (* testpb.SimpleResponse , error ) {
@@ -2209,14 +2209,14 @@ func testClientRequestBodyError_CloseAfterLength(t *testing.T, e env) {
2209
2209
})
2210
2210
}
2211
2211
2212
- func TestClientRequestBodyError_Cancel (t * testing.T ) {
2212
+ func TestClientRequestBodyErrorCancel (t * testing.T ) {
2213
2213
defer leakCheck (t )()
2214
2214
for _ , e := range listTestEnv () {
2215
- testClientRequestBodyError_Cancel (t , e )
2215
+ testClientRequestBodyErrorCancel (t , e )
2216
2216
}
2217
2217
}
2218
2218
2219
- func testClientRequestBodyError_Cancel (t * testing.T , e env ) {
2219
+ func testClientRequestBodyErrorCancel (t * testing.T , e env ) {
2220
2220
te := newTest (t , e )
2221
2221
gotCall := make (chan bool , 1 )
2222
2222
ts := & funcServer {unaryCall : func (ctx context.Context , in * testpb.SimpleRequest ) (* testpb.SimpleResponse , error ) {
@@ -2246,14 +2246,14 @@ func testClientRequestBodyError_Cancel(t *testing.T, e env) {
2246
2246
})
2247
2247
}
2248
2248
2249
- func TestClientRequestBodyError_Cancel_StreamingInput (t * testing.T ) {
2249
+ func TestClientRequestBodyErrorCancelStreamingInput (t * testing.T ) {
2250
2250
defer leakCheck (t )()
2251
2251
for _ , e := range listTestEnv () {
2252
- testClientRequestBodyError_Cancel_StreamingInput (t , e )
2252
+ testClientRequestBodyErrorCancelStreamingInput (t , e )
2253
2253
}
2254
2254
}
2255
2255
2256
- func testClientRequestBodyError_Cancel_StreamingInput (t * testing.T , e env ) {
2256
+ func testClientRequestBodyErrorCancelStreamingInput (t * testing.T , e env ) {
2257
2257
te := newTest (t , e )
2258
2258
recvErr := make (chan error , 1 )
2259
2259
ts := & funcServer {streamingInputCall : func (stream testpb.TestService_StreamingInputCallServer ) error {
@@ -2283,12 +2283,12 @@ func testClientRequestBodyError_Cancel_StreamingInput(t *testing.T, e env) {
2283
2283
2284
2284
const clientAlwaysFailCredErrorMsg = "clientAlwaysFailCred always fails"
2285
2285
2286
- var clientAlwaysFailCredError = errors .New (clientAlwaysFailCredErrorMsg )
2286
+ var errClientAlwaysFailCred = errors .New (clientAlwaysFailCredErrorMsg )
2287
2287
2288
2288
type clientAlwaysFailCred struct {}
2289
2289
2290
2290
func (c clientAlwaysFailCred ) ClientHandshake (ctx context.Context , addr string , rawConn net.Conn ) (net.Conn , credentials.AuthInfo , error ) {
2291
- return nil , nil , clientAlwaysFailCredError
2291
+ return nil , nil , errClientAlwaysFailCred
2292
2292
}
2293
2293
func (c clientAlwaysFailCred ) ServerHandshake (rawConn net.Conn ) (net.Conn , credentials.AuthInfo , error ) {
2294
2294
return rawConn , nil , nil
@@ -2308,8 +2308,8 @@ func TestDialWithBlockErrorOnBadCertificates(t *testing.T) {
2308
2308
)
2309
2309
opts = append (opts , grpc .WithTransportCredentials (clientAlwaysFailCred {}), grpc .WithBlock ())
2310
2310
te .cc , err = grpc .Dial (te .srvAddr , opts ... )
2311
- if err != clientAlwaysFailCredError {
2312
- te .t .Fatalf ("Dial(%q) = %v, want %v" , te .srvAddr , err , clientAlwaysFailCredError )
2311
+ if err != errClientAlwaysFailCred {
2312
+ te .t .Fatalf ("Dial(%q) = %v, want %v" , te .srvAddr , err , errClientAlwaysFailCred )
2313
2313
}
2314
2314
}
2315
2315
0 commit comments