[GATLING-2.0.0M3A] Error with thje directive "If-Modified-Since"

287 views
Skip to first unread message

Gilles LALANDE

unread,
Oct 16, 2013, 12:02:15 PM10/16/13
to gat...@googlegroups.com
Hi Stéphane

I make a test with gatling 2 and i have a problem with the header directive 'If-Modified-Since..." .In my example below, the call of the val headers_51 generate the following error :

[ERROR] [10/16/2013 17:57:50.768] [GatlingSystem-akka.actor.default-dispatcher-6
] [akka://GatlingSystem/user/$Cc/$b] URI http://www.total.fr/cs/Total_NW/js/swfo
bject/swfobject.js was redirected to null location
java.lang.IllegalArgumentException: URI http://www.total.fr/cs/Total_NW/js/swfob
ject/swfobject.js was redirected to null location
        at com.ning.http.util.AsyncHttpProviderUtils.getRedirectUri(AsyncHttpPro
viderUtils.java:234)
        at io.gatling.http.ahc.AsyncHandlerActor.redirect$1(AsyncHandlerActor.sc
ala:135)
        at io.gatling.http.ahc.AsyncHandlerActor.io$gatling$http$ahc$AsyncHandle
rActor$$processResponse(AsyncHandlerActor.scala:173)
        at io.gatling.http.ahc.AsyncHandlerActor$$anonfun$receive$1.applyOrElse(
AsyncHandlerActor.scala:55)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425)
        at akka.actor.ActorCell.invoke(ActorCell.scala:386)


Source :
val headers_3 = Map("""Accept""" -> """*/*""")

val headers_32 = Map(
"""Accept""" -> """text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8""",
"""If-Modified-Since""" -> """Wed, 08 Feb 2012 08:24:55 GMT""",
"""If-None-Match""" -> """"1543f-57e-4b86fa15dc3c0"""")

val headers_51 = Map(
"""Accept""" -> """*/*""",
"""If-Modified-Since""" -> """Mon, 30 May 2011 09:48:43 GMT""",
"""If-None-Match""" -> """"dfcaa-2bf6-4a47b315db4c0"""")

val headers_76 = Map(
"""Accept""" -> """*/*""",
"""If-Modified-Since""" -> """Mon, 30 May 2011 09:48:43 GMT""",
"""If-None-Match""" -> """"db418-3e2c-4a47b315db4c0"""")

val headers_78 = Map(
"""Accept""" -> """*/*""",
"""If-Modified-Since""" -> """Mon, 30 May 2011 09:48:43 GMT""",
"""If-None-Match""" -> """"e4c36-4800-4a47b315db4c0"""")

val chain_0 = exec(http("request_1")
.get("""/""")
.headers(headers_1))
.pause(393 milliseconds)
...
.exec(http("request_26")
.get("""/cs/Total_NW/js/swfobject/swfobject.js""")
.headers(headers_3))

...


.exec(http("request_51")
.get("""/cs/Total_NW/js/swfobject/swfobject.js""")
.headers(headers_51))


Is there a a workaround to simulate the 304 response server?
Thanks a lot for your anwer

Gilles

Stéphane Landelle

unread,
Oct 16, 2013, 12:07:37 PM10/16/13
to gat...@googlegroups.com
Hi Gilles,

Which version do you use exactly? 2M3a? a snapshot?

Embedded resources fetching + caching will be the big new feature of 2M4.


2013/10/16 Gilles LALANDE <gilles.la...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Gilles LALANDE

unread,
Oct 16, 2013, 12:54:20 PM10/16/13
to gat...@googlegroups.com
Thank you Stéphane, I have 're-downloaded' the version 2M3a and replace my current version. Effectively i have no error. 

I'm waiting the 2M4 for the caching. good luck gatling is very promising
Gilles

E. Ulrich Kriegel

unread,
Apr 14, 2014, 9:13:29 AM4/14/14
to gat...@googlegroups.com
Hi Stéphane,

I downloaded 2.0.0-M3a last Friday, but i still get 

[GatlingSystem-akka.actor.default-dispatcher-11] [akka://GatlingSystem/user/$k/$b] URI https://espri-host178.fokus.fraunhofer.de/96bbac1c738aa5d2899bae07f8ef68f16de6ed48/service_areas was redirected to null location

java.lang.IllegalArgumentException: URI https://espri-host178.fokus.fraunhofer.de/96bbac1c738aa5d2899bae07f8ef68f16de6ed48/service_areas was redirected to null location

at com.ning.http.util.AsyncHttpProviderUtils.getRedirectUri(AsyncHttpProviderUtils.java:234)

at io.gatling.http.ahc.AsyncHandlerActor.redirect$1(AsyncHandlerActor.scala:136)

at io.gatling.http.ahc.AsyncHandlerActor.io$gatling$http$ahc$AsyncHandlerActor$$processResponse(AsyncHandlerActor.scala:174)

at io.gatling.http.ahc.AsyncHandlerActor$$anonfun$receive$1.applyOrElse(AsyncHandlerActor.scala:55)

at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425)

at akka.actor.ActorCell.invoke(ActorCell.scala:386)

at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:230)

at akka.dispatch.Mailbox.run(Mailbox.scala:212)

at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506)

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)


[ERROR] [04/14/2014 15:02:25.942] [GatlingSystem-akka.actor.default-dispatcher-11] [akka://GatlingSystem/user/$k] URI https://espri-host178.fokus.fraunhofer.de/96bbac1c738aa5d2899bae07f8ef68f16de6ed48/service_areas was redirected to null location

java.lang.IllegalArgumentException: URI https://espri-host178.fokus.fraunhofer.de/96bbac1c738aa5d2899bae07f8ef68f16de6ed48/service_areas was redirected to null location

at com.ning.http.util.AsyncHttpProviderUtils.getRedirectUri(AsyncHttpProviderUtils.java:234)

at io.gatling.http.ahc.AsyncHandlerActor.redirect$1(AsyncHandlerActor.scala:136)

at io.gatling.http.ahc.AsyncHandlerActor.io$gatling$http$ahc$AsyncHandlerActor$$processResponse(AsyncHandlerActor.scala:174)

at io.gatling.http.ahc.AsyncHandlerActor$$anonfun$receive$1.applyOrElse(AsyncHandlerActor.scala:55)

at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425)

at akka.actor.ActorCell.invoke(ActorCell.scala:386)

at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:230)

at akka.dispatch.Mailbox.run(Mailbox.scala:212)

at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506)

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)


-- Ulrich

Stéphane Landelle

unread,
Apr 14, 2014, 9:19:15 AM4/14/14
to gat...@googlegroups.com
That's something that was fixed since 2M3a.

I can help migrating.


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

E. Ulrich Kriegel

unread,
Apr 14, 2014, 10:38:48 AM4/14/14
to gat...@googlegroups.com
Hi Stéphane,
I already tried to use the nightly build,
but I got a lot of errors compiling my tests:

i6dhcp159:gatling-charts-highcharts-2.0.0-SNAPSHOT ukriegel$ ./bin/gatling.sh 

GATLING_HOME is set to /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT

16:37:53.165 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/DeleteDeviceScenario.scala:5: not found: object bootstrap

16:37:53.168 [ERROR] i.g.a.ZincCompiler$ - import bootstrap._

16:37:53.169 [ERROR] i.g.a.ZincCompiler$ -        ^

16:37:54.398 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/FillSimulation.scala:5: object Headers is not a member of package io.gatling.http

16:37:54.399 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.http.Headers.Names._

16:37:54.399 [ERROR] i.g.a.ZincCompiler$ -                        ^

16:37:54.415 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetDeviceScenario.scala:5: not found: object bootstrap

16:37:54.416 [ERROR] i.g.a.ZincCompiler$ - import bootstrap._

16:37:54.416 [ERROR] i.g.a.ZincCompiler$ -        ^

16:37:54.615 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/FillSimulation.scala:15: not found: value constantRate

16:37:54.616 [ERROR] i.g.a.ZincCompiler$ - setUp(GetDeviceScenario.scn.inject(constantRate(10 usersPerSec) during (2400 seconds)))

16:37:54.616 [ERROR] i.g.a.ZincCompiler$ -                                    ^

16:37:54.618 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetAlertScenario.scala:5: not found: object bootstrap

16:37:54.618 [ERROR] i.g.a.ZincCompiler$ - import bootstrap._

16:37:54.618 [ERROR] i.g.a.ZincCompiler$ -        ^

16:37:54.702 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetAlertSimulation.scala:5: object Headers is not a member of package io.gatling.http

16:37:54.702 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.http.Headers.Names._

16:37:54.702 [ERROR] i.g.a.ZincCompiler$ -                        ^

16:37:54.706 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetAlertSimulation.scala:12: not found: value constantRate

16:37:54.707 [ERROR] i.g.a.ZincCompiler$ -     GetAlertScenario.scn.inject(constantRate(30 usersPerSec) during (duration seconds)))

16:37:54.707 [ERROR] i.g.a.ZincCompiler$ -                                 ^

16:37:54.713 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetServiceAreasScenario.scala:3: value bootstrap is not a member of object io.gatling.core.Predef

16:37:54.713 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.core.Predef.bootstrap.exec

16:37:54.713 [ERROR] i.g.a.ZincCompiler$ -                               ^

16:37:54.716 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetServiceAreasScenario.scala:6: value extractorCheckBuilder2MatcherCheckBuilder is not a member of object io.gatling.core.Predef

16:37:54.716 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.core.Predef.extractorCheckBuilder2MatcherCheckBuilder

16:37:54.716 [ERROR] i.g.a.ZincCompiler$ -        ^

16:37:54.719 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetServiceAreasScenario.scala:13: value requestBuilder2ActionBuilder is not a member of object io.gatling.http.Predef

16:37:54.719 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.http.Predef.requestBuilder2ActionBuilder

16:37:54.719 [ERROR] i.g.a.ZincCompiler$ -        ^

16:37:54.770 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetServiceAreasScenario.scala:25: value is is not a member of io.gatling.http.check.HttpSingleCheckBuilder[io.gatling.http.response.Response,Int]

16:37:54.770 [ERROR] i.g.a.ZincCompiler$ - .check(status.saveAs("status"), status.is(304))

16:37:54.770 [ERROR] i.g.a.ZincCompiler$ -                                        ^

16:37:54.820 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetServiceAreasScenario.scala:35: value is is not a member of io.gatling.http.check.HttpSingleCheckBuilder[io.gatling.http.response.Response,Int]

16:37:54.820 [ERROR] i.g.a.ZincCompiler$ - .check(status.saveAs("status"), status.is(200)))

16:37:54.820 [ERROR] i.g.a.ZincCompiler$ -                                        ^

16:37:54.823 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/GetServiceAreasSimulation.scala:5: object Headers is not a member of package io.gatling.http

16:37:54.823 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.http.Headers.Names._

16:37:54.823 [ERROR] i.g.a.ZincCompiler$ -                        ^

16:37:54.834 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/PutDeviceScenario.scala:5: not found: object bootstrap

16:37:54.835 [ERROR] i.g.a.ZincCompiler$ - import bootstrap._

16:37:54.835 [ERROR] i.g.a.ZincCompiler$ -        ^

16:37:54.993 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/SimpleGabrielSimulation.scala:5: object Headers is not a member of package io.gatling.http

16:37:54.993 [ERROR] i.g.a.ZincCompiler$ - import io.gatling.http.Headers.Names._

16:37:54.993 [ERROR] i.g.a.ZincCompiler$ -                        ^

16:37:54.998 [ERROR] i.g.a.ZincCompiler$ - /Users/ukriegel/tmp/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/katwarn/gabriel/SimpleGabrielSimulation.scala:15: not found: value ramp

16:37:54.998 [ERROR] i.g.a.ZincCompiler$ - setUp(GetDeviceScenario.scn.inject(ramp(2 users) over (2 seconds)))

16:37:54.998 [ERROR] i.g.a.ZincCompiler$ -                                    ^

16:37:55.009 [ERROR] i.g.a.ZincCompiler$ - 16 errors found

Compilation failed

i6dhcp159:gatling-charts-highcharts-2.0.0-SNAPSHOT ukriegel$ 

Stéphane Landelle

unread,
Apr 14, 2014, 10:42:11 AM4/14/14
to gat...@googlegroups.com
Migrating is not that complicated:
  • import bootstrap._ => remove
  • import assertions._ => remove
  • Headers.Names => HeaderNames
  • ramp(n users) => rampUsers(n)

Nicolas Rémond

unread,
Apr 14, 2014, 10:48:29 AM4/14/14
to gat...@googlegroups.com
First round of fixes.

setUp(GetDeviceScenario.scn.inject(ramp(2 users) over (2 seconds)))
=>
setUp(GetDeviceScenario.scn.inject(rampUsers(2) over (2 seconds)))


The imports are now:
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._



Cheers
nicolas



E. Ulrich Kriegel

unread,
Apr 14, 2014, 11:00:10 AM4/14/14
to gat...@googlegroups.com
Thanks for your help,
the only remaining error is missing constantRate. what is the replacement?

My second question is, ho to integrate the nightly build in my eclipse environment?

Nicolas Rémond

unread,
Apr 14, 2014, 11:01:36 AM4/14/14
to gat...@googlegroups.com
  val inject3 = constantUsersPerSec(10).during(1 minute)

Reply all
Reply to author
Forward
0 new messages