@@ -376,9 +376,11 @@ func TestAutoVersion(t *testing.T) {
376
376
testClientAuto (t ,
377
377
func (s * grpc.Server ) {
378
378
grpc_reflection_v1 .Register (s )
379
+ // HACK: The above won't show up in list of service names, so we need at least one other.
380
+ testprotosgrpc .RegisterDummyServiceServer (s , testService {})
379
381
},
380
382
[]string {
381
- "grpc.reflection.v1.ServerReflection " ,
383
+ "testprotos.DummyService " ,
382
384
},
383
385
[]string {
384
386
"/grpc.reflection.v1.ServerReflection/ServerReflectionInfo" ,
@@ -392,9 +394,11 @@ func TestAutoVersion(t *testing.T) {
392
394
testClientAuto (t ,
393
395
func (s * grpc.Server ) {
394
396
reflection .Register (s )
397
+ testprotosgrpc .RegisterDummyServiceServer (s , testService {})
395
398
},
396
399
[]string {
397
400
"grpc.reflection.v1alpha.ServerReflection" ,
401
+ "testprotos.DummyService" ,
398
402
},
399
403
[]string {
400
404
// first one fails, so falls back to v1alpha
@@ -414,10 +418,11 @@ func TestAutoVersion(t *testing.T) {
414
418
func (s * grpc.Server ) {
415
419
grpc_reflection_v1 .Register (s )
416
420
reflection .Register (s )
421
+ testprotosgrpc .RegisterDummyServiceServer (s , testService {})
417
422
},
418
423
[]string {
419
- "grpc.reflection.v1.ServerReflection" ,
420
424
"grpc.reflection.v1alpha.ServerReflection" ,
425
+ "testprotos.DummyService" ,
421
426
},
422
427
[]string {
423
428
// never uses v1alpha since v1 works
0 commit comments