Use `use ExUnit.Case, async: true` https://hexdocs.pm/ex_unit/ExUnit.html
Also, for TDD one might run the currently-under-development tests with `mix test test/foo_test.exs:5` or using tags https://hexdocs.pm/mix/Mix.Tasks.Test.html On Tue, Aug 2, 2022 at 12:31 AM Grant West <grant.we...@gmail.com> wrote: > Is there a modern solution so this? If a Case necessarily has several > unavoidably slow tests, is there any way to run them in parallel? For TDD > purposes, adding even 5 seconds to total test duration is very undesirable. > Did the "context" solution ever come to pass? What is the modern solution? > Would you be open to something like "use ExUnit.Case, parallel: true"? > > I understand that defaulting to parallel would break many things. But > there are many, if not the majority of cases were parallel tests would be > fine. Most test suites don't access global state. Having the OPTION to > enable parallel tests where it just isn't feasible to speed tests up would > be a good tool. > > On Sunday, May 1, 2011 at 9:33:04 AM UTC-5 José Valim wrote: > >> Fixed then: >> >> >> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_josevalim_elixir_commit_de39c45d26d82376db032e045e0e35aac9b059d3&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=jfHCVIxBTPjGBr8Pz2N10lYOGVfxgPj_AahrcDCZZlI&e=> >> https://github.com/josevalim/elixir/commit/de39c45d26d82376db032e045e0e35aac9b059d3 >> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_josevalim_elixir_commit_de39c45d26d82376db032e045e0e35aac9b059d3&d=DwQFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=jfHCVIxBTPjGBr8Pz2N10lYOGVfxgPj_AahrcDCZZlI&e=> >> >> >> >> *José Valim >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.plataformatec.com.br_&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=Wwk8DpAEYATfC8ap5nM4Zf3JMMMINyxlIaXAoEY1DIs&e=>www.plataformatec.com.br >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.plataformatec.com.br&d=DwQFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=7SlyeUozNVMh53z5UQ4wGrBWbzy_p9hMnntW3R9AIS4&e=> >> Founder and Lead Developer* >> >> >> On Sun, May 1, 2011 at 3:02 PM, miaout17 <miao...@gmail.com >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__tniopfoorp&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=HDpIHOIFZDwUdZzg5Gomw88Qe4kZGw0z7VTltRuUz5E&e=> >> > wrote: >> >>> On 4月30日, 下午3時10分, José Valim < >>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__tniopfoorp&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=HDpIHOIFZDwUdZzg5Gomw88Qe4kZGw0z7VTltRuUz5E&e=> >>> jose.va >>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__jose.va&d=DwQFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=lzqv0tbP0vsMa7TFJE32Og19Lz4lAUCslu1ML8UybEA&e=> >>> ...@gmail.com> wrote: >>> > With this in mind, do you think it is still worth to give a shot to >>> parallel tests (2)? >>> >>> I considered again. Now I think (2) is not very needed. >>> In most case class-level parallel is enough, and "context" can handle >>> special cases like long task in CodeTest. >> >> >> -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_elixir-2Dlang-2Dcore_157d0acc-2De8fe-2D4573-2D9715-2D4ba014b58e9dn-2540googlegroups.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=J23bARmFVTXULzM80GuV9KbdtPmoaJtaWBn6dVVFUL0&e=> > https://groups.google.com/d/msgid/elixir-lang-core/157d0acc-e8fe-4573-9715-4ba014b58e9dn%40googlegroups.com > <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_msgid_elixir-2Dlang-2Dcore_157d0acc-2De8fe-2D4573-2D9715-2D4ba014b58e9dn-2540googlegroups.com&d=DwQFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=rmhwzhuTk1LyLPLZIrqkat6wS6r2qE3XZKnTTHGaxH8&m=vfcOyEJ_NtBqHLsQifOZmeDxlAkkpCNlPs4enddolkY&s=6KnBMSnIiDjzZt04NzLWrA4A4NoTz1ZtM5VsUHtoqEE&e=> > . > -- *Aleksei Matiushkin*, Software Engineer - R&D Office (+34) 935 679 834 8 Devonshire Square, London, EC2M 4PL, United Kingdom Torre Mapfre, Planta 22, Marina, 16-18, 08005 Barcelona, Spain *kantox.com <http://kantox.com/>* <http://www.linkedin.com/company/1871617> <http://www.linkedin.com/company/1871617>[image: LinkedIn] <https://www.linkedin.com/company/1871617> <https://twitter.com/kantox>[image: Twitter] <https://twitter.com/kantox> <http://www.youtube.com/user/kantoxfx>[image: YouTube] <https://www.youtube.com/user/kantoxfx> Kantox Limited is a UK private company with registered company number 07657495 and registered address at 8 Devonshire Square, London EC2M 4PL, United Kingdom. We are authorised with the UK Financial Conduct Authority (FCA) under the Payment Service Regulation 2017 as a Payments Institution (FRN 580343) for the provision of payment services and with HMRC as a Money Service Business Registration No.12641987. Kantox European Union, S.L. is a Spanish private company with tax ID number B67369371 and registered address at Torre Mapfre, Planta 22, Marina, 16-18, 08005 Barcelona, Spain. Kantox is authorized by the Bank of Spain, with registration number 6890, which is the supervisor of the Spanish banking system along with the European Central Bank. Additionally, we are supervised by SEPBLAC, the Supervisory Authority for the prevention of money laundering and terrorist financing in Spain. KANTOX is the Controller for the processing of data in accordance with the GDPR and LOPDGDD for the purpose of maintaining a commercial relationship. You may exercise your rights of access and rectification, portability, restriction and opposition by writing to KANTOX to the email: g...@kantox.com. You have your right to make a complaint at www.aepd.es. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGF5_6eS62H_EQ7vEj_OyaJqUBuYT4dsFSL%3D_uPGNR2N4%2BtUxQ%40mail.gmail.com.