.findAll() Does Not Always Return Results In The Order Found

Hi,

I was expecting that .findAll() would return a vector that was ordered by the order of how the elements were found. It seems that this happens most of the time, but not always. i need the vector to be in order so so that I can compare it against what I’m expecting the order to be. What’s the best way to always get the results back in the order that they’re found in the json tree?

`

jsonPath snippet:

{

“results”: {

“foo1”: {

“id”: “1”

},

“foo2”: {

“id”: “2”

},

“foo3”: {

“id”: “3”

},

“foo4”: {

“id”: “4”

}

}

}

code snippet:

jsonPath("$.results.*.id").findAll.saveAs(“ids”)))
.exec(session => {
println("Ids: " + session(“ids”).as[String])
session
})

desired output:

=> Ids: Vector(1, 2, 3, 4)

actual output (intermittently):
=> Ids: Vector(2, 4, 3, 1)

`

Thanks,
Christian

Hi,

AFAIK, this is already fixed in master: https://github.com/gatling/gatling/issues/2899
I wasn’t able to reproduce with latest master.

Cheers,