Permalink
Browse files

add a nop akka event handler

helps avoid cluttering the test output
  • Loading branch information...
1 parent f095e8a commit f31dcda7fa1a3047717bca63486ca8e4147ff56f @benmur committed Jan 4, 2013
@@ -3,11 +3,13 @@ package net.benmur.riemann.client.testingsupport
import org.scalatest.BeforeAndAfterAll
import akka.actor.ActorSystem
import org.scalatest.Suite
+import com.typesafe.config.ConfigFactory
trait ImplicitActorSystem extends BeforeAndAfterAll {
self: Suite =>
- implicit val system = ActorSystem()
+ implicit val system = ActorSystem("test", config = ConfigFactory.parseString(
+ """akka.event-handlers = [ "net.benmur.riemann.client.testingsupport.NopEventHandler" ]"""))
override def afterAll {
super.afterAll
@@ -0,0 +1,11 @@
+package net.benmur.riemann.client.testingsupport
+
+import akka.actor.Actor
+import akka.event.Logging.InitializeLogger
+import akka.event.Logging.LoggerInitialized
+
+class NopEventHandler extends Actor {
+ def receive: Receive = {
+ case InitializeLogger(_) => sender ! LoggerInitialized
+ }
+}

0 comments on commit f31dcda

Please sign in to comment.