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:
