Skip to content

Commit 758c368

Browse files
authored
chore: fix TestTailnet/ForcesWebSockets flake (#8953)
1 parent 827de08 commit 758c368

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

coderd/batchstats/batcher.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313

1414
"cdr.dev/slog"
1515
"cdr.dev/slog/sloggers/sloghuman"
16-
1716
"github.com/coder/coder/coderd/database"
1817
"github.com/coder/coder/coderd/database/dbauthz"
1918
"github.com/coder/coder/codersdk/agentsdk"

tailnet/conn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func TestTailnet(t *testing.T) {
9999

100100
t.Run("ForcesWebSockets", func(t *testing.T) {
101101
t.Parallel()
102-
ctx := testutil.Context(t, testutil.WaitLong)
102+
ctx := testutil.Context(t, testutil.WaitMedium)
103103

104104
w1IP := tailnet.IP()
105105
derpMap := tailnettest.RunDERPOnlyWebSockets(t)

tailnet/tailnettest/tailnettest.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ func RunDERPOnlyWebSockets(t *testing.T) *tailcfg.DERPMap {
7777
handler, closeFunc = tailnet.WithWebsocketSupport(d, handler)
7878
server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
7979
if r.URL.Path != "/derp" {
80-
handler.ServeHTTP(w, r)
80+
w.WriteHeader(http.StatusOK)
81+
_, _ = w.Write([]byte("hello"))
8182
return
8283
}
8384
if r.Header.Get("Upgrade") != "websocket" {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy