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

Tests are not robust to parallel running #13

Closed
Altai-man opened this issue Oct 11, 2019 · 5 comments
Closed

Tests are not robust to parallel running #13

Altai-man opened this issue Oct 11, 2019 · 5 comments

Comments

@Altai-man
Copy link
Member

Altai-man commented Oct 11, 2019

Right now, test files assume running in a certain order specified by file names.

I am not sure whether we want to teach Comma about something like "Execute those tests in order in a single thread", but right now parallel execution, even with a single worker, will lead to failed tests, which is not always stable.

@jnthn
Copy link
Member

jnthn commented Oct 11, 2019

@Altai-man So they only pass because prove, say, will sort the test files by filename?

@Altai-man
Copy link
Member Author

@jnthn not sure about prove, but zef test ., at the very least, passes. while Comma breaks with "no cache prepared".

@JJ
Copy link
Collaborator

JJ commented Feb 26, 2020

I see the extent of the problem now. As indicated by @antoniogamiz, in this answer in Stackoverflow, the problem is that we are never updating a cache. Caches can't simply be updated. What we were doing before was creating a cache in a program, and then using the cache from another program. As ugexe says, the first time we do "load" is when we cache the results, so by creating the Pod::To::Cached object we "freeze" the cache. Subsequent calls to load will simply not work.
I'm not sure how to get out of this, since all that part of Rakudo is under-documented. Don't know if we can somehow unlock the cache and update it; or somehow not call load so that we don't freeze it. I would be very grateful if you suggested any solution.

JJ added a commit that referenced this issue Feb 26, 2020
Understanding the power of the cache
JJ added a commit that referenced this issue Feb 26, 2020
Seeing some light at the end of the tunnel for #16 and #13. Also just eliminating debug code. And found also #18
@antoniogamiz
Copy link
Collaborator

@JJ did you want to comment that in this issue or in #16?

@JJ
Copy link
Collaborator

JJ commented Feb 28, 2020

@antoniogamiz probably in the other issue... Let's leave this for the parallel update, which is a different problem. It would require not only the tests being independent, but also use random temporary directory to avoid race conditions.

antoniogamiz added a commit that referenced this issue Feb 29, 2020
@JJ JJ closed this as completed in d019bda May 6, 2020
JJ added a commit that referenced this issue May 6, 2020
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

4 participants