!tes #3544 Added 'system' as default parameter to the shutdown method on
TestKit
This commit is contained in:
parent
a04a784121
commit
e045c537a3
7 changed files with 7 additions and 7 deletions
|
|
@ -31,7 +31,7 @@ class ProducerFeatureTest extends TestKit(ActorSystem("test", AkkaSpec.testConf)
|
||||||
|
|
||||||
override protected def afterAll() {
|
override protected def afterAll() {
|
||||||
super.afterAll()
|
super.afterAll()
|
||||||
shutdown(system)
|
shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
val camelContext = camel.context
|
val camelContext = camel.context
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import akka.camel.internal.ActivationProtocol._
|
||||||
|
|
||||||
class ActivationTrackerTest extends TestKit(ActorSystem("test")) with WordSpecLike with Matchers with BeforeAndAfterAll with BeforeAndAfterEach with GivenWhenThen {
|
class ActivationTrackerTest extends TestKit(ActorSystem("test")) with WordSpecLike with Matchers with BeforeAndAfterAll with BeforeAndAfterEach with GivenWhenThen {
|
||||||
|
|
||||||
override protected def afterAll() { shutdown(system) }
|
override protected def afterAll() { shutdown() }
|
||||||
|
|
||||||
var actor: TestProbe = _
|
var actor: TestProbe = _
|
||||||
var awaiting: Awaiting = _
|
var awaiting: Awaiting = _
|
||||||
|
|
|
||||||
|
|
@ -379,7 +379,7 @@ private[camel] trait ActorProducerFixture extends MockitoSugar with BeforeAndAft
|
||||||
}
|
}
|
||||||
|
|
||||||
override protected def afterAll() {
|
override protected def afterAll() {
|
||||||
shutdown(system)
|
shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
def msg(s: String) = CamelMessage(s, Map.empty)
|
def msg(s: String) = CamelMessage(s, Map.empty)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class TimerBasedThrottlerSpec extends TestKit(ActorSystem("TimerBasedThrottlerSp
|
||||||
import TimerBasedThrottlerSpec._
|
import TimerBasedThrottlerSpec._
|
||||||
|
|
||||||
override def afterAll {
|
override def afterAll {
|
||||||
shutdown(system)
|
shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
"A throttler" must {
|
"A throttler" must {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class TestKitUsageSpec
|
||||||
system.actorOf(Props(classOf[SequencingActor], testActor, headList, tailList))
|
system.actorOf(Props(classOf[SequencingActor], testActor, headList, tailList))
|
||||||
|
|
||||||
override def afterAll {
|
override def afterAll {
|
||||||
shutdown(system)
|
shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
"An EchoActor" should {
|
"An EchoActor" should {
|
||||||
|
|
|
||||||
|
|
@ -656,7 +656,7 @@ trait TestKitBase {
|
||||||
*
|
*
|
||||||
* If verifySystemShutdown is true, then an exception will be thrown on failure.
|
* If verifySystemShutdown is true, then an exception will be thrown on failure.
|
||||||
*/
|
*/
|
||||||
def shutdown(actorSystem: ActorSystem,
|
def shutdown(actorSystem: ActorSystem = system,
|
||||||
duration: Duration = 5.seconds.dilated.min(10.seconds),
|
duration: Duration = 5.seconds.dilated.min(10.seconds),
|
||||||
verifySystemShutdown: Boolean = false) {
|
verifySystemShutdown: Boolean = false) {
|
||||||
TestKit.shutdownActorSystem(actorSystem, duration, verifySystemShutdown)
|
TestKit.shutdownActorSystem(actorSystem, duration, verifySystemShutdown)
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ abstract class AkkaSpec(_system: ActorSystem)
|
||||||
|
|
||||||
final override def afterAll {
|
final override def afterAll {
|
||||||
beforeTermination()
|
beforeTermination()
|
||||||
shutdown(system)
|
shutdown()
|
||||||
afterTermination()
|
afterTermination()
|
||||||
stopCoroner()
|
stopCoroner()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue