What happend with concurrentQueue?

Hi guys!

I’ve been trying to setup Gatling to use concurrentQueue feed strategy but seems that it doesn’t exist anymore on 2.0.0-M3a. Is it right?
I read the documentation about the changes on Gatling 2 but I didn’t find anything about. I gave a look on Gatling core source code too, but even there I didnt find anything with “concurrentQueue”.
What happened with concurrentQueue? Is there any other strategy that I can use to feed my concurrent scenario?

[INFO] Building gatling-maven-plugin-demo 2.0.0-M3a
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — gatling-maven-plugin:2.0.0-M3a:execute (default-cli) @ gatling-maven-plugin-demo —
16:14:32.780 [ERROR] i.g.a.ZincCompiler$ - C:\Users\ac-rrocha\Workspace\ItemMaster\ImWebServiceGatling\src\test\scala\itemmaster_ws_feeders\LookupSkuFeedersScenario.scala:34: value concurrentQueue is not a member of io.gatling.core.feeder.AdvancedFeederBuilder[String]
16:14:32.783 [ERROR] i.g.a.ZincCompiler$ - val lookupRequestsInput = csv(“lookup_requests_input.csv”).concurrentQueue

Thanks!

Hi,

We refactored feeders are they are now completely threadsafe.
So, queue (which is the default) is enough.

Cheers,

Stéphane

Thanks for the fast reply Stéphane!

My real problem is about consume a feeder with multiple users. How can I setup the repeat over a queue feeder in a dynamically way without have an exception like: java.util.NoSuchElementException: next on empty iterator.

Following is the way that I’m doing, but it works just for one user. If I put more than one I have the above exception.

val lookupRequestsInput = csv(“lookup_requests_input.csv”)

scenario(“LookupSku Scenario”)
.repeat(lookupRequestsInput.data.size) {
feed(lookupRequestsInput)
.repeat(10) {
exec(
http(“LookupStyleCCSkuAttributesByStyleId”)
.post("/ItemMasterService/")
.body(StringBody(soapEnvelope))
)
}
}

As I understand, you want all your users to play the same data: the full sequence of records contained in your feeder.

Feeders are shared amongst users so that users don’t play the same data and you don’t end up hitting caches instead of your real application, so you can’t do that with this API. Note that we’re considering adding non shared feeders.

With 2M3a:

.repeat(lookupRequestsInput.data.size, “i”) {
exec(session => session(“i”).validate[Int].map(i => session.setAll(lookupRequestsInput.data(i))))

.repeat(10) {
exec(
http(“LookupStyleCCSkuAttributesByStyleId”)
.post("/ItemMasterService/")
.body(StringBody(soapEnvelope))
)
}

}

Get it?

Stéphane

I got it, but I think I didn’t explain it well.

In my case I want a shared feeder, just the way you mentioned.

If I execute my load test with with 2 users and 5 rows in my feeder file, I want that Gatling performs 50 requests (5 rows x repeat(10)). While in the example that you send above Gatling will perform 100 requests (2 users x 5 rows x repeat(10)), right?

So, my problem is how to setup the repeat line in dynamically way considering the number of users. Something like:

scenario(“LookupSku Scenario”)
.repeat(lookupRequestsInput.data.size / numberOfUsers) {
feed(lookupRequestsInput)
.repeat(10) {
exec(
http(“LookupStyleCCSkuAttributesByStyleId”)
.post("/ItemMasterService/")
.body(StringBody(soapEnvelope))
)

But this solution above doesn’t guarantee that it won’t throw java.util.NoSuchElementException since each thread/user will consume different number of rows according to its priority.

Does it makes sense?

Ah, OK.

Cool!
seems that it’s gonna work for me!

Thanks for your patience and time Stephane and congratz for Gatling! Awesome tool!

Thanks!
Have fun!