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

Commit2347078

Browse files
authored
fix: ignore cancellation error in test (#15532)
Fixes:coder/internal#211
1 parentdbf41a1 commit2347078

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎provisionersdk/agent_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"net/http"
1414
"net/http/httptest"
1515
"net/url"
16+
"os"
1617
"os/exec"
1718
"runtime"
1819
"strings"
@@ -119,7 +120,9 @@ func TestAgentScript(t *testing.T) {
119120

120121
// Kill the command, wait for the command to yield.
121122
err:=cmd.Cancel()
122-
iferr!=nil {
123+
iferrors.Is(err,os.ErrProcessDone) {
124+
t.Log("script has already finished execution")
125+
}elseiferr!=nil {
123126
t.Fatalf("unable to cancel the command: %v, see logs:\n%s",err,output.String())
124127
}
125128
wg.Wait()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp