elixir
elixir copied to clipboard
Make newsletter exercise tests run async
I just went through this exercise as part of the Exhort. It seemed trivial to make this exercise run tests asynchronous by generating random temp files using some core utils.
Thank you for contributing to exercism/elixir
💜 🎉. This is an automated PR comment 🤖 for the maintainers of this repository that helps with the PR review process. You can safely ignore it and wait for a maintainer to review your changes.
Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:
-
General steps
- 🏆 Does this PR need to receive a label with a reputation modifier (
x:size/{tiny,small,medium,large,massive}
)? (A medium reputation amount is awarded by default, see docs)
- 🏆 Does this PR need to receive a label with a reputation modifier (
-
Any exercise changed
- 👤 Does the author of the PR need to be added as an author or contributor in
<exercise>/.meta/config.json
(see docs)? - 🔬 Do the analyzer and the analyzer comments exist for this exercise? Do they need to be changed?
- 📜 Does the design file (
<exercise>/.meta/design.md
) need to be updated to document new implementation decisions?
- 👤 Does the author of the PR need to be added as an author or contributor in
-
Concept exercise changed
- 🌲 Do
prerequisites
andpractices
inconfig.json
need to be updated? - 📖 Does the concept introduction provide all necessary information to solve this exercise?
- 🌲 Do
-
Concept exercise tests changed
- ⚪️ Are all tests un-skipped?
- 🔢 Are all tests annotated with
@tag task_id
? - 🐈 Can all tests be understood by reading the test's block only (e.g. no module attributes, no setup functions)?
Automated comment created by PR Commenter 🤖.
My understanding is that marking a test module as async
only enables concurrent testing against other modules. The individual tests of a single module always run sequentially. 🤷♂️
https://hexdocs.pm/ex_unit/main/ExUnit.Case.html
@zorn You're absolutely right. This existing code with the comment in the tests should never have been added:
# run test synchronously to be able to use the same file path for all tests without write conflicts
use ExUnit.Case, async: false
Our bad 🙈. But that also means this PR isn't really needed. We just need to remove the snippet I posted above to avoid future confusion.
Hah, well TIL.
Happy to update/change the PR to remove that little snippet. Thanks to both of you.
Happy to update/change the PR to remove that little snippet
That would be much appreciated!
@halfdan are you still interested in finishing this PR? We can add the hacktoberfest label to it if you're interested.
Yep, still happy to finish this. The tag would be a nice perk.
@jiegillet Perfectly fine - sorry for dropping the ball here.