Skip to content

Commit d04748f

Browse files
authored
test: fix flaky TestDeps by using group output (#2926)
1 parent 651aa44 commit d04748f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

executor_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ func TestDeps(t *testing.T) {
517517
WithExecutorOptions(
518518
task.WithDir("testdata/deps"),
519519
task.WithSilent(true),
520+
// Deps run in parallel and, with the default interleaved output,
521+
// their sub-line writes (echo writes the content and the newline
522+
// separately) can interleave into a garbled buffer. Group output
523+
// flushes each command atomically, keeping every line intact. The
524+
// set of lines asserted (via PPSortedLines) is unchanged.
525+
task.WithOutputStyle(ast.Output{Name: "group"}),
520526
),
521527
WithPostProcessFn(PPSortedLines),
522528
)

0 commit comments

Comments
 (0)