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

Run tests in parallel #104

Closed
sol opened this issue Oct 28, 2012 · 4 comments
Closed

Run tests in parallel #104

sol opened this issue Oct 28, 2012 · 4 comments
Milestone

Comments

@sol
Copy link
Member

sol commented Oct 28, 2012

Open issues:

@adinapoli
Copy link

Hello there.
I've noticed the same issue rising when I've tried to run a spec where its functions where having contention on a log file. We can take inspiration from Scala's specs2, where you can toggle parallel execution with the function "sequential" at the beginning of each spec. Here we could do something like :

mySpec  = hspec $ sequentially $ do
                    ....

@sol
Copy link
Member Author

sol commented Jun 1, 2013

Yes, sounds like a good idea.

We would then probably run all specs that are marked with sequentially in the applications main thread (mainly because the runner/formatter also access stdout/stderr).

@sol sol closed this as completed in 0834613 Jun 8, 2013
@sol
Copy link
Member Author

sol commented Jun 8, 2013

For now specs have to be explicitly marked with parallel for parallel execution. That way it's backward compatible. In the future we can improve on this by:

  • Adding a --parallel option to hspec-discover
  • Providing a sequential combinator; if sequential and parallel are used in a nested way the innermost combinator should take precedence

@adinapoli
Copy link

Nice!

iustin added a commit to iustin/corydalis that referenced this issue Jun 13, 2019
Huh, I thought hspec does this automatically, but according to
discussion in hspec/hspec#104 and the doc,
there's no automagic way to do this. It does improve speed by 2×,
which is good first step.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants