small test changes for Scala 2.12 (#21738)
This commit is contained in:
parent
a0e2286b70
commit
1ff1f5edee
3 changed files with 6 additions and 4 deletions
|
|
@ -11,7 +11,9 @@ import akka.testkit._
|
||||||
import scala.concurrent.duration._
|
import scala.concurrent.duration._
|
||||||
import scala.concurrent.Await
|
import scala.concurrent.Await
|
||||||
|
|
||||||
class LocalDeathWatchSpec extends AkkaSpec with ImplicitSender with DefaultTimeout with DeathWatchSpec
|
class LocalDeathWatchSpec extends AkkaSpec("""
|
||||||
|
akka.actor.serialize-messages = off
|
||||||
|
""") with ImplicitSender with DefaultTimeout with DeathWatchSpec
|
||||||
|
|
||||||
object DeathWatchSpec {
|
object DeathWatchSpec {
|
||||||
def props(target: ActorRef, testActor: ActorRef) = Props(new Actor {
|
def props(target: ActorRef, testActor: ActorRef) = Props(new Actor {
|
||||||
|
|
@ -112,7 +114,7 @@ trait DeathWatchSpec { this: AkkaSpec with ImplicitSender with DefaultTimeout
|
||||||
filterException[ActorKilledException] {
|
filterException[ActorKilledException] {
|
||||||
val supervisor = system.actorOf(Props(new Supervisor(
|
val supervisor = system.actorOf(Props(new Supervisor(
|
||||||
OneForOneStrategy(maxNrOfRetries = 2)(List(classOf[Exception])))))
|
OneForOneStrategy(maxNrOfRetries = 2)(List(classOf[Exception])))))
|
||||||
val terminalProps = Props(new Actor { def receive = { case x ⇒ sender() ! x } })
|
val terminalProps = TestActors.echoActorProps
|
||||||
val terminal = Await.result((supervisor ? terminalProps).mapTo[ActorRef], timeout.duration)
|
val terminal = Await.result((supervisor ? terminalProps).mapTo[ActorRef], timeout.duration)
|
||||||
|
|
||||||
val monitor = startWatching(terminal)
|
val monitor = startWatching(terminal)
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ object TypedActorSpec {
|
||||||
fixed-pool-size = 60
|
fixed-pool-size = 60
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
akka.actor.serialize-messages = off
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class CyclicIterator[T](val items: immutable.Seq[T]) extends Iterator[T] {
|
class CyclicIterator[T](val items: immutable.Seq[T]) extends Iterator[T] {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ object Dependencies {
|
||||||
val junitVersion = "4.12"
|
val junitVersion = "4.12"
|
||||||
|
|
||||||
val Versions = Seq(
|
val Versions = Seq(
|
||||||
crossScalaVersions := Seq("2.11.8"), // "2.12.0-RC1"
|
crossScalaVersions := Seq("2.11.8"), // "2.12.0-RC2"
|
||||||
scalaVersion := crossScalaVersions.value.head,
|
scalaVersion := crossScalaVersions.value.head,
|
||||||
scalaStmVersion := sys.props.get("akka.build.scalaStmVersion").getOrElse("0.7"),
|
scalaStmVersion := sys.props.get("akka.build.scalaStmVersion").getOrElse("0.7"),
|
||||||
scalaCheckVersion := sys.props.get("akka.build.scalaCheckVersion").getOrElse("1.13.2"),
|
scalaCheckVersion := sys.props.get("akka.build.scalaCheckVersion").getOrElse("1.13.2"),
|
||||||
|
|
@ -28,7 +28,6 @@ object Dependencies {
|
||||||
},
|
},
|
||||||
java8CompatVersion := {
|
java8CompatVersion := {
|
||||||
scalaVersion.value match {
|
scalaVersion.value match {
|
||||||
case x if x.startsWith("2.12.0-RC1") => "0.8.0-RC7"
|
|
||||||
case x if x.startsWith("2.12.0") => "0.8.0-RC8"
|
case x if x.startsWith("2.12.0") => "0.8.0-RC8"
|
||||||
case _ => "0.7.0"
|
case _ => "0.7.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue