aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 a0d48490d..bb49e6b9b 100644
--- a/test/grpc_test.go
+++ b/test/grpc_test.go
@@ -22,7 +22,8 @@ func TestGrpc(t *testing.T) {
}
defer g.Stop()
- ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
+ ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+ defer cancel()
conn, err := grpc.DialContext(ctx, tcp, grpc.WithInsecure(), grpc.WithBlock())
if err != nil {
t.Fatalf("Expected no error but got: %s", err)