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
ParallelTestExecution causes sbt to think tests always pass. #432
Comments
we're seeing this with sbt 0.13.7 in https://github.com/ensime/ensime-server/pull/843 https://travis-ci.org/ensime/ensime-server/builds/52514899 weirdly, I thought we had disabled parallel testing when running on travis. |
Hi!
I inspected the results using a custom SBT As a workaround for Travis CI builds, I'm invoking the ScalaTest Runner instead of
|
@aakoshh great! That is strong evidence that this might be an sbt bug |
This is impacting us too - using ParallelTestExecution seems the only way to make the Akka Actor tests work, which makes it difficult to pick up the test failure status in SBT as it's ignored |
I'm seeing the same thing:
Would really love a resolution to this issue. We're having to parse the log output directly in our Jenkins build to reliably halt on test failure. ScalaTest 2.2.0 |
This also became a problem for me. Thank you very much to @aakoshh for your solution! It works very well for me. |
FYI, the fix is merged into 3.0.x branch already (unfortunately didn't make it into 3.0.0-M8), and shall be back-ported into 2.2.x as well. |
Wow! Great news! |
so was this an sbt or a scalatest bug? |
@cheeseng is this in a 2.2.x release yet? Also, where is the commit that fixes it? |
Hi Sam, Not sure. I'll investigate with Chee Seng tonight and if it didn't get released yet I'll make a 2.2.x release tonight. Sorry we've been focused on getting 3.0 out the door. Bill |
ironically, it turns out that parallel tests are slower in ENSIME because we already push the machine to the limit in terms of parallel JVMs to run the suites. Oh well 😄 |
Hi Sam, Do you mean running suites in parallel or actually running tests within a suite in parallel, which requires ParallelTestExecution? Oh, probably the latter since this ticket is about PTE. Assuming that, then yes, that's why we don't do that by default. Usually running suites (test classes) in parallel will give sufficient parallelism that running tests in parallel won't help much to improve performance. In cases where it does help performance to run the tests in parallel, that's when PTE should be mixed in. (And it is a performance enhancement, so really people should measure and if it doesn't help performance, I'd just "unmix" it back out.) Bill |
We did some digging and I released 2.2.6-M1 on Sep 10, and it includes the fix. Can you try that and let me know if it fixes the issue? |
OK, I'll put together a test project if there isn't already one. |
@danmbyrd's dummy project correctly fails the tests in 2.2.6-M1 and 3.0.0-M14. BTW, have you ever looked into |
Awesome. Thanks for trying it out. I will get a 2.2.6 release out this week in conjunction with a 3.0 milestone that with luck will be the last milestone before RC1. In the meantime you can use 2.2.6-M1. |
Includes scalatestplus upgrade too. This should fix a parallel test issue: scalatest/scalatest#432
Hi,
I think I may have discovered a bug with the integration between sbt and scalatest. I've attempted to reproduce the issue in this dummy project - https://gist.github.com/danmbyrd/b4d9ec4168a19de59264. It seems that mixing in ParallelTestExection causes SBT to think that the tests within that spec always pass.
With the project as shown in the gist I get this output:
The exit code seems to also reflect that sbt does not think any of the tests are failing (despite the logging):
Where as if I remove the mixing in of
ParallelTestExecution
I get the following:I'm using scalatest 2.2.2, sbt 0.13.6 and scala 2.10.4 as shown in the project.
Let me know if theres any additional information that could be helpful, and apologies if this is an issue that is more on the SBT side.
The text was updated successfully, but these errors were encountered: