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

Commit6b4eb03

Browse files
authored
chore: give additional time in tests fortailnetAPIConnector graceful disconnect (#12980)
Failure seen here:https://github.com/coder/coder/actions/runs/8711258577/job/23894964182?pr=12979
1 parent3338cdc commit6b4eb03

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

‎codersdk/workspacesdk/connector.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import (
2020
"github.com/coder/retry"
2121
)
2222

23+
vartailnetConnectorGracefulTimeout=time.Second
24+
2325
// tailnetConn is the subset of the tailnet.Conn methods that tailnetAPIConnector uses. It is
2426
// included so that we can fake it in testing.
2527
//
@@ -86,7 +88,7 @@ func runTailnetAPIConnector(
8688
func (tac*tailnetAPIConnector)manageGracefulTimeout() {
8789
defertac.cancelGracefulCtx()
8890
<-tac.ctx.Done()
89-
timer:=time.NewTimer(time.Second)
91+
timer:=time.NewTimer(tailnetConnectorGracefulTimeout)
9092
defertimer.Stop()
9193
select {
9294
case<-tac.closed:

‎codersdk/workspacesdk/connector_internal_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ import (
2424
"github.com/coder/coder/v2/testutil"
2525
)
2626

27+
funcinit() {
28+
// Give tests a bit more time to timeout. Darwin is particularly slow.
29+
tailnetConnectorGracefulTimeout=5*time.Second
30+
}
31+
2732
funcTestTailnetAPIConnector_Disconnects(t*testing.T) {
2833
t.Parallel()
2934
testCtx:=testutil.Context(t,testutil.WaitShort)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp