@@ -38,6 +38,7 @@ import (
38
38
"google.golang.org/grpc/internal/testutils"
39
39
"google.golang.org/grpc/internal/testutils/proxyserver"
40
40
testgrpc "google.golang.org/grpc/interop/grpc_testing"
41
+ testpb "google.golang.org/grpc/interop/grpc_testing"
41
42
"google.golang.org/grpc/resolver"
42
43
"google.golang.org/grpc/resolver/manual"
43
44
)
@@ -55,7 +56,7 @@ func Test(t *testing.T) {
55
56
func startBackendServer (t * testing.T ) * stubserver.StubServer {
56
57
t .Helper ()
57
58
backend := & stubserver.StubServer {
58
- EmptyCallF : func (context.Context , * testgrpc .Empty ) (* testgrpc .Empty , error ) { return & testgrpc .Empty {}, nil },
59
+ EmptyCallF : func (context.Context , * testpb .Empty ) (* testpb .Empty , error ) { return & testpb .Empty {}, nil },
59
60
}
60
61
if err := backend .StartServer (); err != nil {
61
62
t .Fatalf ("failed to start backend: %v" , err )
@@ -119,7 +120,7 @@ func (s) TestGRPCDialWithProxy(t *testing.T) {
119
120
120
121
// Send an empty RPC to the backend through the proxy.
121
122
client := testgrpc .NewTestServiceClient (conn )
122
- if _ , err := client .EmptyCall (ctx , & testgrpc .Empty {}); err != nil {
123
+ if _ , err := client .EmptyCall (ctx , & testpb .Empty {}); err != nil {
123
124
t .Fatalf ("EmptyCall failed: %v" , err )
124
125
}
125
126
@@ -176,7 +177,7 @@ func (s) TestGRPCDialWithDNSAndProxy(t *testing.T) {
176
177
177
178
// Send an empty RPC to the backend through the proxy.
178
179
client := testgrpc .NewTestServiceClient (conn )
179
- if _ , err := client .EmptyCall (ctx , & testgrpc .Empty {}); err != nil {
180
+ if _ , err := client .EmptyCall (ctx , & testpb .Empty {}); err != nil {
180
181
t .Fatalf ("EmptyCall failed: %v" , err )
181
182
}
182
183
@@ -235,7 +236,7 @@ func (s) TestNewClientWithProxy(t *testing.T) {
235
236
236
237
// Send an empty RPC to the backend through the proxy.
237
238
client := testgrpc .NewTestServiceClient (conn )
238
- if _ , err := client .EmptyCall (ctx , & testgrpc .Empty {}); err != nil {
239
+ if _ , err := client .EmptyCall (ctx , & testpb .Empty {}); err != nil {
239
240
t .Fatalf ("EmptyCall failed: %v" , err )
240
241
}
241
242
if ! proxyCalled {
@@ -295,7 +296,7 @@ func (s) TestNewClientWithProxyAndCustomResolver(t *testing.T) {
295
296
296
297
// Send an empty RPC to the backend through the proxy.
297
298
client := testgrpc .NewTestServiceClient (conn )
298
- if _ , err := client .EmptyCall (ctx , & testgrpc .Empty {}); err != nil {
299
+ if _ , err := client .EmptyCall (ctx , & testpb .Empty {}); err != nil {
299
300
t .Fatalf ("EmptyCall() failed: %v" , err )
300
301
}
301
302
@@ -351,7 +352,7 @@ func (s) TestNewClientWithProxyAndTargetResolutionEnabled(t *testing.T) {
351
352
352
353
// Send an empty RPC to the backend through the proxy.
353
354
client := testgrpc .NewTestServiceClient (conn )
354
- if _ , err := client .EmptyCall (ctx , & testgrpc .Empty {}); err != nil {
355
+ if _ , err := client .EmptyCall (ctx , & testpb .Empty {}); err != nil {
355
356
t .Fatalf ("EmptyCall failed: %v" , err )
356
357
}
357
358
@@ -400,7 +401,7 @@ func (s) TestNewClientWithNoProxy(t *testing.T) {
400
401
401
402
// Create a test service client and make an RPC call.
402
403
client := testgrpc .NewTestServiceClient (conn )
403
- if _ , err := client .EmptyCall (ctx , & testgrpc .Empty {}); err != nil {
404
+ if _ , err := client .EmptyCall (ctx , & testpb .Empty {}); err != nil {
404
405
t .Fatalf ("EmptyCall() failed: %v" , err )
405
406
}
406
407
}
@@ -449,7 +450,7 @@ func (s) TestNewClientWithContextDialer(t *testing.T) {
449
450
defer conn .Close ()
450
451
451
452
client := testgrpc .NewTestServiceClient (conn )
452
- if _ , err := client .EmptyCall (ctx , & testgrpc .Empty {}); err != nil {
453
+ if _ , err := client .EmptyCall (ctx , & testpb .Empty {}); err != nil {
453
454
t .Fatalf ("EmptyCall() failed: %v" , err )
454
455
}
455
456
}
@@ -510,7 +511,7 @@ func (s) TestBasicAuthInNewClientWithProxy(t *testing.T) {
510
511
511
512
// Send an empty RPC to the backend through the proxy.
512
513
client := testgrpc .NewTestServiceClient (conn )
513
- client .EmptyCall (ctx , & testgrpc .Empty {})
514
+ client .EmptyCall (ctx , & testpb .Empty {})
514
515
515
516
if ! proxyCalled {
516
517
t .Fatalf ("Proxy not connected" )
0 commit comments