@@ -31,7 +31,7 @@ import (
3131
3232const defaultTestTimeout = 10 * time .Second
3333
34- var ctxWithTimeout , cancel = context .WithTimeout (context .Background (), defaultTestTimeout )
34+ var ctx , cancel = context .WithTimeout (context .Background (), defaultTestTimeout )
3535
3636type s struct {
3737 grpctest.Tester
@@ -207,7 +207,7 @@ func (s) TestFromIncomingContext(t *testing.T) {
207207 )
208208 // Verify that we lowercase if callers directly modify md
209209 md ["X-INCORRECT-UPPERCASE" ] = []string {"foo" }
210- ctx := NewIncomingContext (ctxWithTimeout , md )
210+ ctx := NewIncomingContext (ctx , md )
211211 defer cancel ()
212212
213213 result , found := FromIncomingContext (ctx )
@@ -244,7 +244,7 @@ func (s) TestValueFromIncomingContext(t *testing.T) {
244244 )
245245 // Verify that we lowercase if callers directly modify md
246246 md ["X-INCORRECT-UPPERCASE" ] = []string {"foo" }
247- ctx := NewIncomingContext (ctxWithTimeout , md )
247+ ctx := NewIncomingContext (ctx , md )
248248 defer cancel ()
249249
250250 for _ , test := range []struct {
@@ -402,7 +402,7 @@ func BenchmarkFromOutgoingContext(b *testing.B) {
402402
403403func BenchmarkFromIncomingContext (b * testing.B ) {
404404 md := Pairs ("X-My-Header-1" , "42" )
405- ctx := NewIncomingContext (ctxWithTimeout , md )
405+ ctx := NewIncomingContext (ctx , md )
406406 defer cancel ()
407407
408408 b .ResetTimer ()
@@ -413,7 +413,7 @@ func BenchmarkFromIncomingContext(b *testing.B) {
413413
414414func BenchmarkValueFromIncomingContext (b * testing.B ) {
415415 md := Pairs ("X-My-Header-1" , "42" )
416- ctx := NewIncomingContext (ctxWithTimeout , md )
416+ ctx := NewIncomingContext (ctx , md )
417417 defer cancel ()
418418
419419 b .Run ("key-found" , func (b * testing.B ) {
0 commit comments