Enable usage of MultiJvm nrOfNodes in cluster StressSpec, see #2787
* Adjustments to StressSpec for testing large clusters * Performance improvement of mute deadLetters
This commit is contained in:
parent
6b51b4d824
commit
33a8808a6d
9 changed files with 302 additions and 130 deletions
|
|
@ -269,7 +269,6 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
|
|||
}
|
||||
}
|
||||
system.shutdown()
|
||||
val shutdownTimeout = 5.seconds.dilated
|
||||
try system.awaitTermination(shutdownTimeout) catch {
|
||||
case _: TimeoutException ⇒
|
||||
val msg = "Failed to stop [%s] within [%s] \n%s".format(system.name, shutdownTimeout,
|
||||
|
|
@ -280,6 +279,8 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
|
|||
afterTermination()
|
||||
}
|
||||
|
||||
def shutdownTimeout: FiniteDuration = 5.seconds.dilated
|
||||
|
||||
/**
|
||||
* Override this and return `true` to assert that the
|
||||
* shutdown of the `ActorSystem` was done properly.
|
||||
|
|
@ -359,12 +360,12 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
|
|||
*/
|
||||
def node(role: RoleName): ActorPath = RootActorPath(testConductor.getAddressFor(role).await)
|
||||
|
||||
def muteDeadLetters(endPatterns: String*)(sys: ActorSystem = system): Unit =
|
||||
def muteDeadLetters(messageClasses: Class[_]*)(sys: ActorSystem = system): Unit =
|
||||
if (!sys.log.isDebugEnabled) {
|
||||
def mute(suffix: String): Unit =
|
||||
sys.eventStream.publish(Mute(EventFilter.warning(pattern = ".*received dead.*" + suffix)))
|
||||
if (endPatterns.isEmpty) mute("")
|
||||
else endPatterns foreach mute
|
||||
def mute(clazz: Class[_]): Unit =
|
||||
sys.eventStream.publish(Mute(DeadLettersFilter(clazz)(occurrences = Int.MaxValue)))
|
||||
if (messageClasses.isEmpty) mute(classOf[AnyRef])
|
||||
else messageClasses foreach mute
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue