rename AkkaSpec.{atTermination => afterTermination}

This commit is contained in:
Roland 2013-01-03 17:17:12 +01:00
parent ff24be7650
commit 6c31d5313e
15 changed files with 19 additions and 19 deletions

View file

@ -100,7 +100,7 @@ abstract class LargeClusterSpec
*/
override def cluster: Cluster = Cluster(system)
override def atTermination(): Unit = {
override def afterTermination(): Unit = {
systems foreach { _.shutdown }
val shutdownTimeout = 20.seconds
val deadline = Deadline.now + shutdownTimeout

View file

@ -127,7 +127,7 @@ class MyMailboxSpec extends DurableMailboxSpec("MyStorage", MyMailboxSpec.config
override def atStartup() {
}
override def atTermination() {
override def afterTermination() {
}
"MyMailbox" must {

View file

@ -28,7 +28,7 @@ class RemoteDeploymentDocSpec extends AkkaSpec("""
val other = ActorSystem("remote", system.settings.config)
val address = other.asInstanceOf[ExtendedActorSystem].provider.getExternalAddressFor(Address("tcp.akka", "s", "host", 1)).get
override def atTermination() { other.shutdown() }
override def afterTermination() { other.shutdown() }
"demonstrate programmatic deployment" in {
//#deploy

View file

@ -45,8 +45,8 @@ class FileBasedMailboxSpec extends DurableMailboxSpec("File", FileBasedMailboxSp
super.atStartup()
}
override def atTermination() {
override def afterTermination() {
clean()
super.atTermination()
super.afterTermination()
}
}

View file

@ -84,14 +84,14 @@ abstract class DurableMailboxSpec(system: ActorSystem, val backendName: String)
try system.awaitTermination(5 seconds) catch {
case _: TimeoutException system.log.warning("Failed to stop [{}] within 5 seconds", system.name)
}
atTermination()
afterTermination()
}
/**
* May be implemented in concrete subclass to do additional things once after all
* test cases have been run.
*/
def atTermination() {}
def afterTermination() {}
protected def streamMustContain(in: InputStream, words: String): Unit = {
val output = new Array[Byte](8192)

View file

@ -272,7 +272,7 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
if (verifySystemShutdown) throw new RuntimeException(msg)
else system.log.warning(msg)
}
atTermination()
afterTermination()
}
/**
@ -293,7 +293,7 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
/**
* Override this method to do something when the whole test is terminating.
*/
protected def atTermination(): Unit = {}
protected def afterTermination(): Unit = {}
/**
* All registered roles

View file

@ -75,7 +75,7 @@ akka {
val here = system.actorFor(RootActorPath(remoteAddr) / "user" / "echo")
override def atTermination() {
override def afterTermination() {
other.shutdown()
}

View file

@ -31,7 +31,7 @@ akka {
EventFilter.warning(pattern = "received dead letter.*Disassociate")))
}
override def atTermination() {
override def afterTermination() {
other.shutdown()
}

View file

@ -70,7 +70,7 @@ akka.actor.deployment {
}""").withFallback(system.settings.config)
val otherSystem = ActorSystem("remote-sys", conf)
override def atTermination() {
override def afterTermination() {
otherSystem.shutdown()
}

View file

@ -114,7 +114,7 @@ class RemotingSpec extends AkkaSpec(RemotingSpec.cfg) with ImplicitSender with D
val here = system.actorFor("test.akka://remote-sys@localhost:12346/user/echo")
override def atTermination() {
override def afterTermination() {
other.shutdown()
AssociationRegistry.clear()
}

View file

@ -125,7 +125,7 @@ abstract class Ticket1978CommunicationSpec(val cipherConfig: CipherConfig) exten
"remote-sys",
ConfigFactory.parseString("akka.remote.netty.port=" + cipherConfig.remotePort).withFallback(system.settings.config))
override def atTermination() {
override def afterTermination() {
if (cipherConfig.runTest) {
other.shutdown()
other.awaitTermination()

View file

@ -37,7 +37,7 @@ akka.loglevel = DEBUG
val target1 = other.actorFor(RootActorPath(addr) / "remote")
val target2 = other.actorFor(RootActorPath(addr) / testActor.path.elements)
override def atTermination() {
override def afterTermination() {
other.shutdown()
}

View file

@ -96,6 +96,6 @@ class AkkaProtocolStressTest extends AkkaSpec(configA) with ImplicitSender with
EventFilter.warning(pattern = "received dead letter.*(InboundPayload|Disassociate)")))
}
override def atTermination(): Unit = systemB.shutdown()
override def afterTermination(): Unit = systemB.shutdown()
}

View file

@ -89,7 +89,7 @@ class ThrottlerTransportAdapterSpec extends AkkaSpec(configA) with ImplicitSende
EventFilter.warning(pattern = "received dead letter.*(InboundPayload|Disassociate)")))
}
override def atTermination(): Unit = systemB.shutdown()
override def afterTermination(): Unit = systemB.shutdown()
}
class ThrottlerTransportAdapterGenericSpec extends GenericTransportSpec(withAkkaProtocol = true) {

View file

@ -77,14 +77,14 @@ abstract class AkkaSpec(_system: ActorSystem)
system.log.warning("Failed to stop [{}] within 5 seconds", system.name)
println(system.asInstanceOf[ActorSystemImpl].printTree)
}
atTermination()
afterTermination()
}
protected def atStartup() {}
protected def beforeTermination() {}
protected def atTermination() {}
protected def afterTermination() {}
def spawn(dispatcherId: String = Dispatchers.DefaultDispatcherId)(body: Unit): Unit =
Future(body)(system.dispatchers.lookup(dispatcherId))