Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add a nop akka event handler

helps avoid cluttering the test output
  • Loading branch information...
commit f31dcda7fa1a3047717bca63486ca8e4147ff56f 1 parent f095e8a
@benmur authored
View
4 src/test/scala/net/benmur/riemann/client/testingsupport/ImplicitActorSystem.scala
@@ -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
View
11 src/test/scala/net/benmur/riemann/client/testingsupport/NopEventHandler.scala
@@ -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
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.