aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/grpc_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/grpc_test.go b/test/grpc_test.go
index fe273e789..a0d48490d 100644
--- a/test/grpc_test.go
+++ b/test/grpc_test.go
@@ -22,7 +22,8 @@ func TestGrpc(t *testing.T) {
}
defer g.Stop()
- conn, err := grpc.Dial(tcp, grpc.WithInsecure(), grpc.WithBlock(), grpc.WithTimeout(5*time.Second))
+ ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
+ conn, err := grpc.DialContext(ctx, tcp, grpc.WithInsecure(), grpc.WithBlock())
if err != nil {
t.Fatalf("Expected no error but got: %s", err)
}