File tree 1 file changed +13
-7
lines changed
1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -282,14 +282,20 @@ func TestWorkspaceAgentStartupLogs(t *testing.T) {
282
282
require .ErrorAs (t , err , & apiError )
283
283
require .Equal (t , http .StatusRequestEntityTooLarge , apiError .StatusCode ())
284
284
285
- var update codersdk.Workspace
286
- select {
287
- case <- ctx .Done ():
288
- t .FailNow ()
289
- case update = <- 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
+ var update codersdk.Workspace
289
+ select {
290
+ case <- ctx .Done ():
291
+ t .FailNow ()
292
+ case update = <- updates :
293
+ }
294
+ if update .LatestBuild .Resources [0 ].Agents [0 ].StartupLogsOverflowed {
295
+ break
296
+ }
290
297
}
291
- // Ensure that the UI gets an update when the logs overflow!
292
- require .True (t , update .LatestBuild .Resources [0 ].Agents [0 ].StartupLogsOverflowed )
298
+
293
299
})
294
300
}
295
301
You can’t perform that action at this time.
0 commit comments