Skip to content

Make the failfast test less flakey.#2801

Open
trulede wants to merge 2 commits into
go-task:mainfrom
trulede:PR/flake-failfast-test
Open

Make the failfast test less flakey.#2801
trulede wants to merge 2 commits into
go-task:mainfrom
trulede:PR/flake-failfast-test

Conversation

@trulede

@trulede trulede commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

This should make the failfast tests less flaky. Added some rudimentary synchronisation.

fixes #2663

@Ikke

Ikke commented Apr 21, 2026

Copy link
Copy Markdown

I have ran the test suite a couple of times with -count=10, no failures so far.

@Ikke

Ikke commented Apr 21, 2026

Copy link
Copy Markdown

I have ran the test suite a couple of times with -count=10, no failures so far.

And I just did one more run, and it failed:

    executor_test.go:1117: Result did not match the golden fixture. Diff is below:

        --- Expected
        +++ Actual
        @@ -1,4 +1,3 @@
         dep1
        -dep2
        -dep3
        +dep3dep2


--- FAIL: TestFailfast (0.24s)
    --- PASS: TestFailfast/Task (13.85s)
        --- PASS: TestFailfast/Task/task (13.85s)
    --- PASS: TestFailfast/Option (14.11s)
        --- PASS: TestFailfast/Option/default (14.03s)
    --- FAIL: TestFailfast/Default (14.27s)
        --- FAIL: TestFailfast/Default/default (14.13s)

@trulede

trulede commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

@Ikke that is a different flake. The executor tests already use a sync-buffer for the collection of stdout so I don't really understand why this would be observed, other than it might be OS weakness (Windows or Mac?). The more tasks that run in parallel, the more likely it is such a problem would occur.

Not exactly sure if anything can be done to mitigate it, on Linux I've run a few 100 cycles with no problem. Anyway, I've pushed a change, but I don't think it will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky TestFailFast tests: Result did not match the golden fixture

2 participants