Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5313884

Browse files
coadlerpull[bot]
authored andcommitted
chore: fixTestTailnet/ForcesWebSockets flake (#8953)
1 parenta832029 commit5313884

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
ifr.URL.Path!="/derp" {
80-
handler.ServeHTTP(w,r)
80+
w.WriteHeader(http.StatusOK)
81+
_,_=w.Write([]byte("hello"))
8182
return
8283
}
8384
ifr.Header.Get("Upgrade")!="websocket" {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp