@@ -274,7 +274,7 @@ func newHandleStreamTest(t *testing.T) *handleStreamTest {
274
274
275
275
func (s ) TestHandlerTransport_HandleStreams (t * testing.T ) {
276
276
st := newHandleStreamTest (t )
277
- handleStream := func (s * Stream ) {
277
+ handleStream := func (s * ServerStream ) {
278
278
if want := "/service/foo.bar" ; s .method != want {
279
279
t .Errorf ("stream method = %q; want %q" , s .method , want )
280
280
}
@@ -313,7 +313,7 @@ func (s) TestHandlerTransport_HandleStreams(t *testing.T) {
313
313
st .ht .WriteStatus (s , status .New (codes .OK , "" ))
314
314
}
315
315
st .ht .HandleStreams (
316
- context .Background (), func (s * Stream ) { go handleStream (s ) },
316
+ context .Background (), func (s * ServerStream ) { go handleStream (s ) },
317
317
)
318
318
wantHeader := http.Header {
319
319
"Date" : nil ,
@@ -342,11 +342,11 @@ func (s) TestHandlerTransport_HandleStreams_InvalidArgument(t *testing.T) {
342
342
func handleStreamCloseBodyTest (t * testing.T , statusCode codes.Code , msg string ) {
343
343
st := newHandleStreamTest (t )
344
344
345
- handleStream := func (s * Stream ) {
345
+ handleStream := func (s * ServerStream ) {
346
346
st .ht .WriteStatus (s , status .New (statusCode , msg ))
347
347
}
348
348
st .ht .HandleStreams (
349
- context .Background (), func (s * Stream ) { go handleStream (s ) },
349
+ context .Background (), func (s * ServerStream ) { go handleStream (s ) },
350
350
)
351
351
wantHeader := http.Header {
352
352
"Date" : nil ,
@@ -379,7 +379,7 @@ func (s) TestHandlerTransport_HandleStreams_Timeout(t *testing.T) {
379
379
if err != nil {
380
380
t .Fatal (err )
381
381
}
382
- runStream := func (s * Stream ) {
382
+ runStream := func (s * ServerStream ) {
383
383
defer bodyw .Close ()
384
384
select {
385
385
case <- s .ctx .Done ():
@@ -395,7 +395,7 @@ func (s) TestHandlerTransport_HandleStreams_Timeout(t *testing.T) {
395
395
ht .WriteStatus (s , status .New (codes .DeadlineExceeded , "too slow" ))
396
396
}
397
397
ht .HandleStreams (
398
- context .Background (), func (s * Stream ) { go runStream (s ) },
398
+ context .Background (), func (s * ServerStream ) { go runStream (s ) },
399
399
)
400
400
wantHeader := http.Header {
401
401
"Date" : nil ,
@@ -412,7 +412,7 @@ func (s) TestHandlerTransport_HandleStreams_Timeout(t *testing.T) {
412
412
// TestHandlerTransport_HandleStreams_MultiWriteStatus ensures that
413
413
// concurrent "WriteStatus"s do not panic writing to closed "writes" channel.
414
414
func (s ) TestHandlerTransport_HandleStreams_MultiWriteStatus (t * testing.T ) {
415
- testHandlerTransportHandleStreams (t , func (st * handleStreamTest , s * Stream ) {
415
+ testHandlerTransportHandleStreams (t , func (st * handleStreamTest , s * ServerStream ) {
416
416
if want := "/service/foo.bar" ; s .method != want {
417
417
t .Errorf ("stream method = %q; want %q" , s .method , want )
418
418
}
@@ -433,7 +433,7 @@ func (s) TestHandlerTransport_HandleStreams_MultiWriteStatus(t *testing.T) {
433
433
// TestHandlerTransport_HandleStreams_WriteStatusWrite ensures that "Write"
434
434
// following "WriteStatus" does not panic writing to closed "writes" channel.
435
435
func (s ) TestHandlerTransport_HandleStreams_WriteStatusWrite (t * testing.T ) {
436
- testHandlerTransportHandleStreams (t , func (st * handleStreamTest , s * Stream ) {
436
+ testHandlerTransportHandleStreams (t , func (st * handleStreamTest , s * ServerStream ) {
437
437
if want := "/service/foo.bar" ; s .method != want {
438
438
t .Errorf ("stream method = %q; want %q" , s .method , want )
439
439
}
@@ -444,10 +444,10 @@ func (s) TestHandlerTransport_HandleStreams_WriteStatusWrite(t *testing.T) {
444
444
})
445
445
}
446
446
447
- func testHandlerTransportHandleStreams (t * testing.T , handleStream func (st * handleStreamTest , s * Stream )) {
447
+ func testHandlerTransportHandleStreams (t * testing.T , handleStream func (st * handleStreamTest , s * ServerStream )) {
448
448
st := newHandleStreamTest (t )
449
449
st .ht .HandleStreams (
450
- context .Background (), func (s * Stream ) { go handleStream (st , s ) },
450
+ context .Background (), func (s * ServerStream ) { go handleStream (st , s ) },
451
451
)
452
452
}
453
453
@@ -476,11 +476,11 @@ func (s) TestHandlerTransport_HandleStreams_ErrDetails(t *testing.T) {
476
476
}
477
477
478
478
hst := newHandleStreamTest (t )
479
- handleStream := func (s * Stream ) {
479
+ handleStream := func (s * ServerStream ) {
480
480
hst .ht .WriteStatus (s , st )
481
481
}
482
482
hst .ht .HandleStreams (
483
- context .Background (), func (s * Stream ) { go handleStream (s ) },
483
+ context .Background (), func (s * ServerStream ) { go handleStream (s ) },
484
484
)
485
485
wantHeader := http.Header {
486
486
"Date" : nil ,
0 commit comments