Merge branch 'master' of github.com:akka/akka
This commit is contained in:
commit
c83ca22aa1
2 changed files with 13 additions and 8 deletions
|
|
@ -9,7 +9,7 @@ import akka.remote.testkit.MultiNodeSpec
|
|||
import akka.testkit._
|
||||
import akka.util.duration._
|
||||
|
||||
object NodeShutdownMultiJvmSpec extends MultiNodeConfig {
|
||||
object SingletonClusterMultiJvmSpec extends MultiNodeConfig {
|
||||
val first = role("first")
|
||||
val second = role("second")
|
||||
|
||||
|
|
@ -24,11 +24,11 @@ object NodeShutdownMultiJvmSpec extends MultiNodeConfig {
|
|||
|
||||
}
|
||||
|
||||
class NodeShutdownMultiJvmNode1 extends NodeShutdownSpec
|
||||
class NodeShutdownMultiJvmNode2 extends NodeShutdownSpec
|
||||
class SingletonClusterMultiJvmNode1 extends SingletonClusterSpec
|
||||
class SingletonClusterMultiJvmNode2 extends SingletonClusterSpec
|
||||
|
||||
abstract class NodeShutdownSpec extends MultiNodeSpec(NodeShutdownMultiJvmSpec) with MultiNodeClusterSpec {
|
||||
import NodeShutdownMultiJvmSpec._
|
||||
abstract class SingletonClusterSpec extends MultiNodeSpec(SingletonClusterMultiJvmSpec) with MultiNodeClusterSpec {
|
||||
import SingletonClusterMultiJvmSpec._
|
||||
|
||||
"A cluster of 2 nodes" must {
|
||||
|
||||
|
|
@ -90,6 +90,7 @@ class LogRoleReplace {
|
|||
|
||||
private val RoleStarted = """\[([\w\-]+)\].*Role \[([\w]+)\] started""".r
|
||||
private val RemoteServerStarted = """\[([\w\-]+)\].*RemoteServerStarted@akka://.*@([\w\-\.]+):([0-9]+)""".r
|
||||
private val ColorCode = """\[[0-9]+m"""
|
||||
|
||||
private var replacements: Map[String, String] = Map.empty
|
||||
private var jvmToAddress: Map[String, String] = Map.empty
|
||||
|
|
@ -106,12 +107,16 @@ class LogRoleReplace {
|
|||
}
|
||||
|
||||
def processLine(line: String): String = {
|
||||
if (updateReplacements(line))
|
||||
replaceLine(line)
|
||||
val cleanLine = removeColorCodes(line)
|
||||
if (updateReplacements(cleanLine))
|
||||
replaceLine(cleanLine)
|
||||
else
|
||||
line
|
||||
cleanLine
|
||||
}
|
||||
|
||||
private def removeColorCodes(line: String): String =
|
||||
line.replaceAll(ColorCode, "")
|
||||
|
||||
private def updateReplacements(line: String): Boolean = {
|
||||
if (line.startsWith("[info] * ")) {
|
||||
// reset when new test begins
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue