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

Commit44ddc9f

Browse files
authored
chore(agent/agentscripts): increase timeout in TestTimeout (#17293)
Fixescoder/internal#329This was due to a race between the process starting and the timeout ofthe agent startup script executor. I'm taking the 'lazy' route here andincreasing the timeout to 100ms. This does technically mean that thismakes the test 100 times longer to execute. However, if it takes morethan 100ms to run a `sleep infinity` command on our test runner, I thinkwe have other issues.
1 parentb1f59aa commit44ddc9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎agent/agentscripts/agentscripts_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func TestTimeout(t *testing.T) {
108108
err:=runner.Init([]codersdk.WorkspaceAgentScript{{
109109
LogSourceID:uuid.New(),
110110
Script:"sleep infinity",
111-
Timeout:time.Millisecond,
111+
Timeout:100*time.Millisecond,
112112
}},aAPI.ScriptCompleted)
113113
require.NoError(t,err)
114114
require.ErrorIs(t,runner.Execute(context.Background(),agentscripts.ExecuteAllScripts),agentscripts.ErrTimeout)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp