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

Refactor test_cache_decorator #185

Closed
mschmidt87 opened this issue Jul 14, 2020 · 0 comments · Fixed by #193
Closed

Refactor test_cache_decorator #185

mschmidt87 opened this issue Jul 14, 2020 · 0 comments · Fixed by #193
Assignees
Labels
high priority Let's fix this quickly! test suite Making sure it's working
Milestone

Comments

@mschmidt87
Copy link
Member

The test_cache_decorator test is not robust and often fails in PRs just because of slight timing differences. We should make it more robust.

@jakobj made the following suggestion in the discussion about #176 :

we should just increase the sleep_time a bit, maybe to 2s. this test fails as travis only gives us a single core and running multiple threads in it seems to slow everything down to the point where the effect of caching is not visible any more.

I have an additional question: What motivates the / 5.0 in the assert statement in this line:

assert (time.time() - t0) < (sleep_time / 5.0)

@mschmidt87 mschmidt87 added the test suite Making sure it's working label Jul 14, 2020
@mschmidt87 mschmidt87 added this to the 0.2.0 milestone Jul 14, 2020
@mschmidt87 mschmidt87 changed the title Refactor test_cache_dectorator Refactor test_cache_decorator Jul 19, 2020
@mschmidt87 mschmidt87 added the high priority Let's fix this quickly! label Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Let's fix this quickly! test suite Making sure it's working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants