Skip to content

Commit c32bb7b

Browse files
committed
fix(proxy): alias stdlib context import to resolve package-level naming collision
Signed-off-by: glatinone <93207632+glatinone@users.noreply.github.com>
1 parent ef96a26 commit c32bb7b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

proxy/upgrade_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package proxy
33
import (
44
"bufio"
55
"bytes"
6-
"context"
6+
stdlibcontext "context"
77
"crypto/tls"
88
"fmt"
99
"io"
@@ -551,7 +551,7 @@ func TestDialBackendHTTPSTimesOutOnStalledHandshake(t *testing.T) {
551551
}
552552

553553
req, err := http.NewRequestWithContext(
554-
context.Background(),
554+
stdlibcontext.Background(),
555555
http.MethodGet,
556556
"https://"+ln.Addr().String()+"/ws",
557557
nil,
@@ -610,7 +610,7 @@ func TestDialBackendRespectsContextCancellation(t *testing.T) {
610610
}
611611

612612
const ctxTimeout = 150 * time.Millisecond
613-
ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
613+
ctx, cancel := stdlibcontext.WithTimeout(stdlibcontext.Background(), ctxTimeout)
614614
defer cancel()
615615

616616
req, err := http.NewRequestWithContext(ctx, http.MethodGet,

0 commit comments

Comments
 (0)