Call to response.body.string causes test to hang

Hello all,
I’m attempting to test a Sinatra JSON api with gatling 2.2.0-SNAPSHOT and whenever I call a check on the response body it causes the test to hang (no exception is raised). The API uses rabl templates to render the JSON which is when the issue occurs. If I render just a raw JSON values it doesn’t hang when response.body.string is called. I can however do the following and see the value being returned.

.transformResponse {
case response if response.isReceived =>
println(Source.fromInputStream(response.body.stream).mkString) // this prints the json value
println(response.body.string) // this causes the test to hang.
}

I have also tried creating a new ResponseWrapper but calling a jsonPath check still causes it to hang.

.transformResponse {
case response if response.isReceived =
new ResponseWrapper(response) {
override val body = new StringResponseBody(
Source.fromInputStream(response.body.stream)(Codec.UTF8).mkString,
)
}
}

I appreciate any help on this, thanks.

and by hangs I mean:

I think this was a regression in the master that was already fixed. There’s a chance your snapshot is not up to date.
Then, you should probably stick to stable, documented releases.

Thank you Stéphane, running the test with gatling 2.1.7 resolved the issue (I’ll stick with stable releases going forward). I greatly appreciate the quick response.

Thank you.