From 5b2a4edd2c2e0bbd49e453c25a62040e194b5778 Mon Sep 17 00:00:00 2001 From: Christopher Batey Date: Tue, 30 Jan 2018 15:23:49 +0000 Subject: [PATCH] Increase timeout for system termination in BasicClusterConfigSpec (#24446) Refs #24444 --- .../src/test/scala/akka/actor/typed/TypedAkkaSpec.scala | 9 ++++++--- .../akka/cluster/typed/BasicClusterExampleSpec.scala | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/TypedAkkaSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/TypedAkkaSpec.scala index 818def6739..1758a52f92 100644 --- a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/TypedAkkaSpec.scala +++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/TypedAkkaSpec.scala @@ -3,17 +3,20 @@ package akka.actor.typed import akka.testkit.typed.{ TestInbox, TestKit } import akka.util.Timeout import org.scalactic.TypeCheckedTripleEquals -import org.scalatest.concurrent.ScalaFutures +import org.scalatest.concurrent.{ Eventually, ScalaFutures } import org.scalatest.time.Span import org.scalatest.{ BeforeAndAfterAll, Matchers, WordSpecLike } + import scala.concurrent.duration._ import scala.util.control.NoStackTrace /** * Helper trait to include standard traits for typed tests */ -trait TypedAkkaSpec extends WordSpecLike with Matchers with BeforeAndAfterAll with ScalaFutures with TypeCheckedTripleEquals { - implicit val akkaPatience = PatienceConfig(3.seconds, Span(100, org.scalatest.time.Millis)) +trait TypedAkkaSpec extends WordSpecLike with Matchers with BeforeAndAfterAll with ScalaFutures + with TypeCheckedTripleEquals with Eventually { + + implicit override val patienceConfig: PatienceConfig = PatienceConfig(3.seconds, Span(100, org.scalatest.time.Millis)) implicit val timeout = Timeout(3.seconds) def assertEmpty(inboxes: TestInbox[_]*): Unit = { diff --git a/akka-cluster-typed/src/test/scala/docs/akka/cluster/typed/BasicClusterExampleSpec.scala b/akka-cluster-typed/src/test/scala/docs/akka/cluster/typed/BasicClusterExampleSpec.scala index 7977c2c6fc..8e349fbe7b 100644 --- a/akka-cluster-typed/src/test/scala/docs/akka/cluster/typed/BasicClusterExampleSpec.scala +++ b/akka-cluster-typed/src/test/scala/docs/akka/cluster/typed/BasicClusterExampleSpec.scala @@ -47,7 +47,7 @@ akka { ).withFallback(configSystem1) } -class BasicClusterConfigSpec extends WordSpec with ScalaFutures with Eventually { +class BasicClusterConfigSpec extends TypedAkkaSpec { import BasicClusterExampleSpec._