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

Commit74f7961

Browse files
authored
chore(agent/agentexec): fix flake in agent/agentexec test (#15681)
Should hopefullyfixcoder/internal#233
1 parenta16f877 commit74f7961

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

‎agent/agentexec/cli_linux_test.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@ import (
2222
"github.com/coder/coder/v2/testutil"
2323
)
2424

25+
//nolint:paralleltest // This test is sensitive to environment variables
2526
funcTestCLI(t*testing.T) {
26-
t.Parallel()
27-
2827
t.Run("OK",func(t*testing.T) {
29-
t.Parallel()
30-
3128
ctx:=testutil.Context(t,testutil.WaitMedium)
3229
cmd,path:=cmd(ctx,t,123,12)
3330
err:=cmd.Start()
@@ -40,8 +37,6 @@ func TestCLI(t *testing.T) {
4037
})
4138

4239
t.Run("Defaults",func(t*testing.T) {
43-
t.Parallel()
44-
4540
ctx:=testutil.Context(t,testutil.WaitMedium)
4641
cmd,path:=cmd(ctx,t,0,0)
4742
err:=cmd.Start()

‎agent/agentexec/exec_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestExec(t *testing.T) {
3636
//nolint:paralleltest // we need to test environment variables
3737
t.Run("Disabled",func(t*testing.T) {
3838
ifruntime.GOOS!="linux" {
39-
t.Skip("skipping on linux")
39+
t.Skip("skipping onnon-linux")
4040
}
4141

4242
cmd,err:=agentexec.CommandContext(context.Background(),"sh","-c","sleep")
@@ -52,7 +52,7 @@ func TestExec(t *testing.T) {
5252
t.Setenv(agentexec.EnvProcPrioMgmt,"hello")
5353

5454
ifruntime.GOOS!="linux" {
55-
t.Skip("skipping on linux")
55+
t.Skip("skipping onnon-linux")
5656
}
5757

5858
executable,err:=os.Executable()
@@ -69,7 +69,7 @@ func TestExec(t *testing.T) {
6969
t.Setenv(agentexec.EnvProcNiceScore,"10")
7070

7171
ifruntime.GOOS!="linux" {
72-
t.Skip("skipping on linux")
72+
t.Skip("skipping onnon-linux")
7373
}
7474

7575
executable,err:=os.Executable()
@@ -86,7 +86,7 @@ func TestExec(t *testing.T) {
8686
t.Setenv(agentexec.EnvProcOOMScore,"123")
8787

8888
ifruntime.GOOS!="linux" {
89-
t.Skip("skipping on linux")
89+
t.Skip("skipping onnon-linux")
9090
}
9191

9292
executable,err:=os.Executable()
@@ -104,7 +104,7 @@ func TestExec(t *testing.T) {
104104
t.Setenv(agentexec.EnvProcNiceScore,"14")
105105

106106
ifruntime.GOOS!="linux" {
107-
t.Skip("skipping on linux")
107+
t.Skip("skipping onnon-linux")
108108
}
109109

110110
executable,err:=os.Executable()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp