chore: update testutil chan helpers (#17408)

This commit is contained in:
ケイラ
2025-04-16 09:37:09 -07:00
committed by GitHub
parent 2a76f5028e
commit f670bc31f5
45 changed files with 582 additions and 559 deletions

View File

@ -408,7 +408,7 @@ func TestStart_AlreadyRunning(t *testing.T) {
}()
pty.ExpectMatch("workspace is already running")
_ = testutil.RequireRecvCtx(ctx, t, doneChan)
_ = testutil.TryReceive(ctx, t, doneChan)
}
func TestStart_Starting(t *testing.T) {
@ -441,7 +441,7 @@ func TestStart_Starting(t *testing.T) {
_ = dbfake.JobComplete(t, store, r.Build.JobID).Pubsub(ps).Do()
pty.ExpectMatch("workspace has been started")
_ = testutil.RequireRecvCtx(ctx, t, doneChan)
_ = testutil.TryReceive(ctx, t, doneChan)
}
func TestStart_NoWait(t *testing.T) {
@ -474,5 +474,5 @@ func TestStart_NoWait(t *testing.T) {
}()
pty.ExpectMatch("workspace has been started in no-wait mode")
_ = testutil.RequireRecvCtx(ctx, t, doneChan)
_ = testutil.TryReceive(ctx, t, doneChan)
}