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

Commitefa69a8

Browse files
committed
fix: iterate through all workspace updates on logs overflow
This was causing some flakes!
1 parent6378294 commitefa69a8

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

‎coderd/workspaceagents_test.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,20 @@ 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)
298+
293299
})
294300
}
295301

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp