These are chat archives for etorreborre/specs2

20th
Mar 2018
Igal Tabachnik
@hmemcpy
Mar 20 2018 09:55
Good morning Eric. I tried running the tests locally on my machine, but even on branch master I seem to get the same error with the JUnitXmlPrinter
drhumlen
@drhumlen
Mar 20 2018 11:32
Is there any way to turn off parallelExecution without sbt's parallelExecution in Test := false ?
I'm porting my project from sbt to mill, and mill doesn't seem to have anything similar to parallelExecution in Test ... what exactly does that sbt option do? how does it pass that information over to the specs2-runner ( org.specs2.runner.Specs2Framework)? Can I pass it some other way?
Eric Torreborre
@etorreborre
Mar 20 2018 13:40
@hmemcpy my schedule is full for today and tonight but I will try to have a look at it tomorrow
@drhumlen sbt parallelExecution runs class concurrently and specs2 doesn’t control that. But inside a specification specs2 runs examples concurrently, is that what you want to deactivate? In that case you need to add the sequential argument to specs2
drhumlen
@drhumlen
Mar 20 2018 16:06

Aha. So it's sbt that's doing the parallelization -- I thought it was the org.specs2.runner.Specs2Framework. After futher experimenting, it seems like my tests actually do run 1-by-1; and not in parallel. (But for some reason, I had to adjust postgres' max number of connections up when going from sbt to mill as the test runner. Not sure why. Maybe mill just executes the spec files with slighlty shorter intervals?)

Anyway, it works now :) I'm aware of the sequential-argument, and I'm already using it. (Unfortunately our tests are mostly integration, so order does matter a lot)

Who decides the order spec-files/classes are executed in btw? The build tool (sbt / mill), or specs2 (org.specs2.runner.Specs2Framework)?
Eric Torreborre
@etorreborre
Mar 20 2018 16:09
the build tool
I think you can actually control the level of parallelism in sbt with the notion of testGroup but I’ve never tried it