lhartikk / ArnoldC

Arnold Schwarzenegger based programming language
lhartikk.github.io/ArnoldC/
Apache License 2.0
6.71k stars 289 forks source link

Tests randomly fail with "sbt test" #103

Closed 22222 closed 8 years ago

22222 commented 8 years ago

It looks like the problem is that the tests run in parallel by default. The tests capture output by globally redirecting standard output to a PrintStream, so if two tests run at the same time then the second test may replace the PrintStream and steal some of the output from the first test.

To avoid this, the solution I've been using is to set "parallelExecution in Test := false" in build.sbt:

diff --git a/build.sbt b/build.sbt
index 0caf41b..1582e98 100644
--- a/build.sbt
+++ b/build.sbt
@@ -27,3 +27,5 @@ libraryDependencies ++= Seq(
 )

 resolvers += "Speech" at "http://maven.it.su.se/it.su.se/maven2"
+
+parallelExecution in Test := false
lhartikk commented 8 years ago

Thanks!

Fixed.