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

Commit5c1dc1b

Browse files
authored
fix: iterate through all workspace updates on logs overflow (#6885)
This was causing some flakes!
1 parente470162 commit5c1dc1b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

‎coderd/workspaceagents_test.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,19 @@ func TestWorkspaceAgentStartupLogs(t *testing.T) {
282282
require.ErrorAs(t,err,&apiError)
283283
require.Equal(t,http.StatusRequestEntityTooLarge,apiError.StatusCode())
284284

285-
varupdate codersdk.Workspace
286-
select {
287-
case<-ctx.Done():
288-
t.FailNow()
289-
caseupdate=<-updates:
285+
// It's possible we have multiple updates queued, but that's alright, we just
286+
// wait for the one where it overflows.
287+
for {
288+
varupdate codersdk.Workspace
289+
select {
290+
case<-ctx.Done():
291+
t.FailNow()
292+
caseupdate=<-updates:
293+
}
294+
ifupdate.LatestBuild.Resources[0].Agents[0].StartupLogsOverflowed {
295+
break
296+
}
290297
}
291-
// Ensure that the UI gets an update when the logs overflow!
292-
require.True(t,update.LatestBuild.Resources[0].Agents[0].StartupLogsOverflowed)
293298
})
294299
}
295300

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp