Skip to content

[Tracking issue] flaky tests #1923

Open

Description

@faddat

Bug Report

We have several Go test units that fail randomly, are flaky, in particular when running by GitHub (e.g., in pull requests).

The goal of this issue is to keep track of them and define what to with the associated test units. The possibilities include:

  1. Remove the test unit, justifying the removal through a PR and associated issue. This approach could be taken with test units that are particular hard to fix or understand and whose removal would presumably not affect the correctness of the code, upon the introduction of changes
  2. Fix the test unit. This is the optimal solution but it takes time, in some cases a lot of time. Notice that at the moment this text is written (Q3-2024), we don't have in our priority list fixing flaky tests.
  3. Add comments to the code to inform that a particular test unit is flaky, possibly linking the corresponding issue. This does not solve the problem but helps onboarding new collaborators.

Main branch

List of potential flaky tests

List produced by @faddat in January 2024. Links for the failed runs were removed because not available any longer.

Activity

  1. added
    bug
    needs-triage
    on Jan 2, 2024
  2. changed the title [-]Multiple flaky tests[/-] [+]Flaky Test Tracking Issue[/+] on Jan 2, 2024
  3. faddat commented on Jan 2, 2024

    @faddat
    ContributorAuthor

    I've begun to submit fixes to the flaky tests. I would like to urge the maintainers to check the fixes extremely harshly, such that none of the fixes endangers the purpose of any of the tests.

    For example, you might try merging all of the fixes to one branch, running ci hundreds of times, and seeing if there are failures.

    But I would also recommend that for each of the sumbitted PR's the underlying code be examined just as harshly as its test.

  4. added
    non-deterministic
    and removed
    needs-triage
    on Jan 9, 2024
  5. faddat commented on Jan 19, 2024

    @faddat
    ContributorAuthor

    I think I figured out TestReader

    --- FAIL: TestReader (0.44s)
        io_test.go:94: r.Status(1)
            expected: {2024-01-19 18:27:55.48 +0000 UTC 10 1 100 100 100 100 0 100ms 0s 0s 0.000% true}
            got     : {2024-01-19 18:27:55.48 +0000 UTC 10 1 100 100 100 100 0 100ms 20ms 0s 0.000% true}
    FAIL
    

    So basically, we're expecting that to do.... something in 0s but it takes 20ms. Also, I kinda think we can tolerate the 20ms.

    // Active, Bytes, Samples, InstRate, CurRate, AvgRate, PeakRate, BytesRem, Start, Duration, Idle, TimeRem, Progress
    want := []Status{

    But maybe we cannot? Reviewing this, this looks ... time related? This is looking for idle to always be 0s.

  6. added
    tracking
    on Jun 11, 2024
  7. changed the title [-]Flaky Test Tracking Issue[/-] [+][Tracking issue] flaky tests[/+] on Jun 11, 2024
  8. added
    testing
    on Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnon-deterministictestingtracking

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions