Enable parallel execution of tests. See #1548
This commit is contained in:
parent
84090ef4e7
commit
6e3c2cb682
2 changed files with 8 additions and 7 deletions
|
|
@ -124,7 +124,7 @@ class SchedulerSpec extends AkkaSpec with BeforeAndAfterEach with DefaultTimeout
|
|||
|
||||
assert(restartLatch.await(2 seconds))
|
||||
// should be enough time for the ping countdown to recover and reach 6 pings
|
||||
assert(pingLatch.await(4, TimeUnit.SECONDS))
|
||||
assert(pingLatch.await(5, TimeUnit.SECONDS))
|
||||
}
|
||||
|
||||
"never fire prematurely" in {
|
||||
|
|
@ -162,12 +162,12 @@ class SchedulerSpec extends AkkaSpec with BeforeAndAfterEach with DefaultTimeout
|
|||
}))
|
||||
|
||||
val startTime = System.nanoTime()
|
||||
val cancellable = system.scheduler.schedule(1 second, 100 milliseconds, actor, Msg)
|
||||
val cancellable = system.scheduler.schedule(1000 milliseconds, 300 milliseconds, actor, Msg)
|
||||
ticks.await(3, TimeUnit.SECONDS)
|
||||
val elapsedTimeMs = (System.nanoTime() - startTime) / 1000000
|
||||
|
||||
assert(elapsedTimeMs > 1200)
|
||||
assert(elapsedTimeMs < 1500) // the precision is not ms exact
|
||||
assert(elapsedTimeMs > 1600)
|
||||
assert(elapsedTimeMs < 2000) // the precision is not ms exact
|
||||
cancellable.cancel()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ object AkkaBuild extends Build {
|
|||
id = "akka",
|
||||
base = file("."),
|
||||
settings = parentSettings ++ Release.settings ++ Unidoc.settings ++ Rstdoc.settings ++ Publish.versionSettings ++ Dist.settings ++ Seq(
|
||||
parallelExecution in GlobalScope := false,
|
||||
parallelExecution in GlobalScope := true,
|
||||
Publish.defaultPublishTo in ThisBuild <<= crossTarget / "repository",
|
||||
Unidoc.unidocExclude := Seq(samples.id, tutorials.id),
|
||||
Dist.distExclude := Seq(actorTests.id, akkaSbtPlugin.id, docs.id)
|
||||
|
|
@ -72,6 +72,8 @@ object AkkaBuild extends Build {
|
|||
dependencies = Seq(actor, actorTests % "test->test", testkit % "test->test"),
|
||||
settings = defaultSettings ++ multiJvmSettings ++ Seq(
|
||||
libraryDependencies ++= Dependencies.cluster,
|
||||
// disable parallel tests
|
||||
parallelExecution in Test := false,
|
||||
extraOptions in MultiJvm <<= (sourceDirectory in MultiJvm) { src =>
|
||||
(name: String) => (src ** (name + ".conf")).get.headOption.map("-Dakka.config=" + _.absolutePath).toSeq
|
||||
},
|
||||
|
|
@ -291,8 +293,7 @@ object AkkaBuild extends Build {
|
|||
unmanagedClasspath in Runtime <+= (baseDirectory in LocalProject("akka")) map { base => Attributed.blank(base / "config") },
|
||||
unmanagedClasspath in Test <+= (baseDirectory in LocalProject("akka")) map { base => Attributed.blank(base / "config") },
|
||||
|
||||
// disable parallel tests
|
||||
parallelExecution in Test := false,
|
||||
parallelExecution in Test := true,
|
||||
|
||||
// for excluding tests by name (or use system property: -Dakka.test.names.exclude=TimingSpec)
|
||||
excludeTestNames := {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue