I’m working against the latest snapshot - just pulled and re-tested before I wrote this up.
I’m writing a smoke test that hits all my deployed web services and ensures proper responses.
I’m seeing this exception a lot in my log - it looks like one per scenario:
[ERROR] [11/13/2013 14:24:56.508] [GatlingSystem-akka.actor.default-dispatcher-2] [akka://GatlingSystem/user/$F] scala.collection.immutable.Map$Map1 cannot be cast to scala.runtime.Nothing$
java.lang.ClassCastException: scala.collection.immutable.Map$Map1 cannot be cast to scala.runtime.Nothing$
at io.gatling.http.cache.CacheHandling$.getLastModifiedStore(CacheHandling.scala:49)
at io.gatling.http.cache.CacheHandling$$anonfun$2.apply(CacheHandling.scala:156)
at io.gatling.http.cache.CacheHandling$$anonfun$2.apply(CacheHandling.scala:153)
at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
at io.gatling.http.cache.CacheHandling$.cache(CacheHandling.scala:172)
at io.gatling.http.ahc.AsyncHandlerActor$$anonfun$updateCache$1.apply(AsyncHandlerActor.scala:49)
at io.gatling.http.ahc.AsyncHandlerActor$$anonfun$updateCache$1.apply(AsyncHandlerActor.scala:49)
at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
at scala.Function1$$anonfun$andThen$1.apply(Function1.scala:55)
at io.gatling.http.ahc.AsyncHandlerActor.regularExecuteNext$1(AsyncHandlerActor.scala:124)
at io.gatling.http.ahc.AsyncHandlerActor.executeNext(AsyncHandlerActor.scala:155)
at io.gatling.http.ahc.AsyncHandlerActor.logAndExecuteNext(AsyncHandlerActor.scala:163)
at io.gatling.http.ahc.AsyncHandlerActor.ok(AsyncHandlerActor.scala:167)
at io.gatling.http.ahc.AsyncHandlerActor.checkAndProceed$1(AsyncHandlerActor.scala:221)
at io.gatling.http.ahc.AsyncHandlerActor.io$gatling$http$ahc$AsyncHandlerActor$$processResponse(AsyncHandlerActor.scala:236)
at io.gatling.http.ahc.AsyncHandlerActor$$anonfun$receive$1.applyOrElse(AsyncHandlerActor.scala:65)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
at akka.actor.ActorCell.invoke(ActorCell.scala:456)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
This is how I’m building my scenario:
def addChecks(req: HttpRequestWithBodyBuilder, checks: Iterable[HttpCheck]) = {
var req1 = req
checks.foreach(c => req1 = req1.check(c))
req1
}
def create(title: String, url: String, method: String = “get”, body: Body = new StringBody(""), checks: Iterable[HttpCheck] = Nil) = {
val test = method match {
case “get”|“GET” => addChecks(http(title).httpRequestWithBody(method, Left(url)).check(status is 200), checks)
case _ => addChecks(http(title).httpRequestWithBody(method, Left(url)).body(body).check(status is 200), checks)
}
scenario(title)
.exec(
test
)
.inject(
atOnceUsers(1)
)
}
So my setup looks like:
setUp(
create(…),
create(…),
…
create(…)
)
The exception doesn’t appear to be impacting my test performance though - just a nuisance that kinda makes my results questionable. Would you like me to open a ticket for this?
–Spencer