I’m modifying a websockets plugin for Gatling 1.5.2, and an integration test has uncovered the stack trace that follows below. It’s puzzling because the message is generated by core Gatling code, which it is not able to handle itself. Are there any suggestions on how to fix this? Can I disable the DataWriters entirely for integration testing using the GatlingConfiguration? I don’t see an obvious way to do this.
Stack trace:
ERROR] [10/02/2013 09:43:20.750] [main] [akka://GatlingSystem/user/$b] Actor ConsoleDataWriter doesn’t support message RequestRecord(test session,1,OpenWebSocketAction,1380732200721,1380732200729,1380732200729,1380732200729,KO,Some(WebSocket method must be a GET),List())
java.lang.IllegalArgumentException: Actor ConsoleDataWriter doesn’t support message RequestRecord(test session,1,OpenWebSocketAction,1380732200721,1380732200729,1380732200729,1380732200729,KO,Some(WebSocket method must be a GET),List())
at com.excilys.ebi.gatling.core.action.BaseActor$class.unhandled(BaseActor.scala:28)
at com.excilys.ebi.gatling.core.result.writer.ConsoleDataWriter.unhandled(ConsoleDataWriter.scala:45)
at akka.actor.Actor$class.apply(Actor.scala:318)
at com.excilys.ebi.gatling.core.result.writer.ConsoleDataWriter.apply(ConsoleDataWriter.scala:45)
at akka.actor.ActorCell.invoke(ActorCell.scala:626)
at akka.testkit.CallingThreadDispatcher.runQueue(CallingThreadDispatcher.scala:235)
at akka.testkit.CallingThreadDispatcher.dispatch(CallingThreadDispatcher.scala:201)
at akka.actor.ActorCell.tell(ActorCell.scala:475)
at akka.actor.LocalActorRef.$bang(ActorRef.scala:328)
at com.excilys.ebi.gatling.core.result.writer.DataWriter$$anonfun$tellAll$1.apply(DataWriter.scala:41)
at com.excilys.ebi.gatling.core.result.writer.DataWriter$$anonfun$tellAll$1.apply(DataWriter.scala:41)
at scala.collection.mutable.ArraySeq.foreach(ArraySeq.scala:72)
at com.excilys.ebi.gatling.core.result.writer.DataWriter$.tellAll(DataWriter.scala:41)
at com.excilys.ebi.gatling.core.result.writer.DataWriter$.logRequest(DataWriter.scala:72)
at com.jivesoftware.gatling.websocket.RequestLogger$class.logRequest(Logging.scala:11)
at com.jivesoftware.gatling.websocket.WebSocketActor.logRequest(Actors.scala:17)
at com.jivesoftware.gatling.websocket.WebSocketActor$$anonfun$receive$1.apply(Actors.scala:40)
at com.jivesoftware.gatling.websocket.WebSocketActor$$anonfun$receive$1.apply(Actors.scala:32)
at akka.actor.Actor$class.apply(Actor.scala:318)
at com.jivesoftware.gatling.websocket.WebSocketActor.apply(Actors.scala:17)
at akka.actor.ActorCell.invoke(ActorCell.scala:626)
at akka.testkit.CallingThreadDispatcher.runQueue(CallingThreadDispatcher.scala:235)
at akka.testkit.CallingThreadDispatcher.dispatch(CallingThreadDispatcher.scala:201)
at akka.actor.ActorCell.tell(ActorCell.scala:475)
at akka.actor.LocalActorRef.$bang(ActorRef.scala:328)
at com.jivesoftware.gatling.websocket.open.OpenWebSocketAction.execute(Open.scala:82)
at com.excilys.ebi.gatling.core.action.Action$$anonfun$receive$1.apply(Action.scala:31)
at com.excilys.ebi.gatling.core.action.Action$$anonfun$receive$1.apply(Action.scala:30)
at scala.PartialFunction$$anon$1.apply(PartialFunction.scala:76)
at akka.actor.Actor$class.apply(Actor.scala:318)
at com.jivesoftware.gatling.websocket.open.OpenWebSocketAction.apply(Open.scala:62)
at akka.actor.ActorCell.invoke(ActorCell.scala:626)
at akka.testkit.CallingThreadDispatcher.runQueue(CallingThreadDispatcher.scala:235)
at akka.testkit.CallingThreadDispatcher.dispatch(CallingThreadDispatcher.scala:201)
at akka.actor.ActorCell.tell(ActorCell.scala:475)
at akka.actor.LocalActorRef.$bang(ActorRef.scala:328)
at com.jivesoftware.gatling.websocket.open.OpenSocketIOConnectionSpec$$anonfun$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(OpenConnectionSpec.scala:50)
at com.jivesoftware.gatling.websocket.open.OpenSocketIOConnectionSpec$$anonfun$1$$anonfun$apply$mcV$sp$1.apply(OpenConnectionSpec.scala:28)
at com.jivesoftware.gatling.websocket.open.OpenSocketIOConnectionSpec$$anonfun$1$$anonfun$apply$mcV$sp$1.apply(OpenConnectionSpec.scala:28)
at org.scalatest.FunSpecLike$$anon$1.apply(FunSpecLike.scala:387)
Relevant code paths are as follows:
trait DataWriter extends BaseActor {
…
def initialized: Receive = {
…
case requestRecord: RequestRecord => onRequestRecord(requestRecord)
}
}
It’s really puzzling to me why the DataWriter would be unable to handle a RequestRecord, but I’m spit out to this path:
trait BaseActor extends Actor with AkkaDefaults with ClassSimpleNameToString with Logging {
override def unhandled(message: Any) {
message match {
case Terminated(dead) => super.unhandled(message)
case unknown => throw new IllegalArgumentException("Actor " + this + " doesn’t support message " + unknown)
}
}
}