Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ri0t opened this issue Nov 22, 2023 · 1 comment
Open

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

ri0t opened this issue Nov 22, 2023 · 1 comment

Comments

@ri0t
Copy link

ri0t commented Nov 22, 2023

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.

@samuelcolvin
Copy link
Owner

Well probably because of unexpected low system resources causing the slower execution.

PR welcome to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants