Skip to content

test_timer can fail for no real reason under certain conditions #147

@ri0t

Description

@ri0t

Helloes,

under certain conditions (maybe system load being high?) the timer tests can fail randomly:

error: builder for '/nix/store/r19bvjb3xkabyzl3w2s19kw16gafachy-python3.11-devtools-0.12.2.drv' failed with exit code 1;
last 10 log lines:
> E - 3 times: mean=0.00Xs stdev=0.00Xs min=0.00Xs max=0.00Xs
> E ? -
> E + 3 times: mean=0.00Xs stdev=0.00Xs min=0.00Xs max=0.010s
> E ? +
>
> tests/test_timer.py:31: AssertionError
> =========================== short test summary info ============================
> FAILED tests/test_timer.py::test_multiple - AssertionError: assert '0.00X: 0.010... max=0.010s\n' == '0.00X: 0.00X... m...
> ============ 1 failed, 95 passed, 8 skipped, 6 deselected in 0.58s =============

Notice the minor timer invariance of 0.010s. I restarted the whole build process a few times and suddenly it built without any changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions