samedi 29 octobre 2016

Slow starting Scalatest

I noticed that scalatest suddenly became lost slower to start the tests. I removed all the tests and only left one, simply testing true. Here is what I get (using sbt)

MacBook-Pro:simulator nicolas$ sbt
[info] Set current project to Simulator (in build file:/Users/nicolas/Private/simulator/)
> compile
[success] Total time: 1 s, completed 29-Oct-2016 14:30:04
> test
[info] MySpec:
[info] A pip
[info] - should pop
[info] Run completed in 312 milliseconds.
[info] Total number of tests run: 1
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[success] Total time: 31 s, completed 29-Oct-2016 14:30:37

As you can see, the compile is instant (1s) and the tests themselve run in 312 milliseconds. What could be explaining that it actually need 31s to run them?

It was not like this to start with, they were running in a few seconds then suddenly jumped up to 30s (even with only 1 extremely quick test) Happens too after a fresh restart of the computer.

Here is my build.sbt just in case:

lazy val root = (project in file(".")).
  settings(
    name := "Simulator",
    version := "0.1",
    scalaVersion := "2.11.8"
  )

// scala JSON library
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.2"

// ScalaTest dependencies
libraryDependencies += "org.scalactic" %% "scalactic" % "3.0.0"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0" % "test"

// QuickLens
libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.8"

Thanks!

Aucun commentaire:

Enregistrer un commentaire