=all #3837 Make akkaScalaNightly compile on scala 2.11.0-M8

This commit is contained in:
Björn Antonsson 2014-01-31 11:14:13 +01:00
parent 85698688e4
commit 179faba453
82 changed files with 651 additions and 643 deletions

View file

@ -55,12 +55,12 @@ trait Player { this: TestConductorExt ⇒
def receive = {
case fsm: ActorRef
waiting = sender(); fsm ! SubscribeTransitionCallBack(self)
case Transition(_, Connecting, AwaitDone) // step 1, not there yet
case Transition(_, AwaitDone, Connected)
case Transition(_, f: ClientFSM.State, t: ClientFSM.State) if (f == Connecting && t == AwaitDone) // step 1, not there yet // // SI-5900 workaround
case Transition(_, f: ClientFSM.State, t: ClientFSM.State) if (f == AwaitDone && t == Connected) // SI-5900 workaround
waiting ! Done; context stop self
case t: Transition[_]
waiting ! Status.Failure(new RuntimeException("unexpected transition: " + t)); context stop self
case CurrentState(_, Connected)
case CurrentState(_, s: ClientFSM.State) if (s == Connected) // SI-5900 workaround
waiting ! Done; context stop self
case _: CurrentState[_]
}

View file

@ -254,6 +254,15 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
val log: LoggingAdapter = Logging(system, this.getClass)
/**
* Enrich `.await()` onto all Awaitables, using remaining duration from the innermost
* enclosing `within` block or QueryTimeout.
*/
implicit def awaitHelper[T](w: Awaitable[T]) = new AwaitHelper(w)
class AwaitHelper[T](w: Awaitable[T]) {
def await: T = Await.result(w, remainingOr(testConductor.Settings.QueryTimeout.duration))
}
final override def multiNodeSpecBeforeAll {
atStartup()
}
@ -264,6 +273,7 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
testConductor.removeNode(myself)
within(testConductor.Settings.BarrierTimeout.duration) {
awaitCond {
// Await.result(testConductor.getNodes, remaining).filterNot(_ == myself).isEmpty
testConductor.getNodes.await.filterNot(_ == myself).isEmpty
}
}
@ -361,15 +371,6 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
else messageClasses foreach mute
}
/**
* Enrich `.await()` onto all Awaitables, using remaining duration from the innermost
* enclosing `within` block or QueryTimeout.
*/
implicit def awaitHelper[T](w: Awaitable[T]) = new AwaitHelper(w)
class AwaitHelper[T](w: Awaitable[T]) {
def await: T = Await.result(w, remainingOr(testConductor.Settings.QueryTimeout.duration))
}
/*
* Implementation (i.e. wait for start etc.)
*/