ScalaTest2 cannot run unit tests when dynamic.classpath is included in IntelliJ [12/13]

We encountered an incomprehensible problem after updating our set of unit tests to ScalaTest2.0 (using Scala 2.10). Currently, all our unit tests are very unreliable: sometimes the process freezes, sometimes we get false failures, and the report inside IntelliJ is corrupted (separate tests not reported under the correct class name, etc.)

After some investigation, we nailed it to the IntelliJ property dynamic.classpath. When the value is set false, the problem disappears, and our unit tests work fine, when the value is set true(even in another project), the problem starts to appear.

The problem is that we need to dynamic.classpathset to true, otherwise IntelliJ complains that the command line is too long, with the following message:

Error running Unit Tests
Command line is too long. In order to reduce its length classpath file can be used.
Would you like to enable classpath file mode for all run configurations of your project?

see the problem here: IDEA 10.5. The command line is too long and What does the dynamic.classpath flag do? (IntelliJ Project Settings)

Any help is appreciated (or maybe a workaround to a "command line too long" without using a dynamic class path?)

IntelliJ v13.0.2 (also happened with 12)
scala plugin v0.30.387
scala v2.10.0
scalatest v2.10-2.0
+3
source share

All Articles