val limit = 100
val totalCount = 1000000
def testDisplay() = {
scenario(scenarioName)
.exec(get("/service/path")
.queryParam("offset", _ => OffsetFeeder.nextOffset(totalCount, limit))
.queryParam("limit", limit)
.check(status is 200)
.transformResponse {
case response if response.statusCode.get >= 400 =>
new ResponseWrapper(response) {
val errorBody = response.body.string
logger warn s"ErrorBody=$errorBody"
}
});
}
setUp(testDisplay.inject(simpleRampUp))
在一些成功的调用之后,gatling抛出其余调用的timeoutexception(它的OKay),如下所示:
17:55:29.035 [INFO ] i.g.h.a.AsyncHandler - Request 'display' failed for user 1993228817214452858-9536: java.util.concurrent.TimeoutException: Request timed out to [host:port] of 60000 ms
在抛出所有时间后,gatling陷入36%并仅记录此(无限):
================================================================================
2015-09-11 18:28:49 4634s elapsed
---- display ---------------------------------------------------------------------
[##########################------------------------------------------------] 36%
waiting: 0 / active: 6364 / done:3636
---- Requests ------------------------------------------------------------------
> Global (OK=3636 KO=0 )
> display (OK=3636 KO=0 )
================================================================================
我希望gatling完成运行,并且所有超时请求都将被视为KO,但它会保留日志记录,并且不会完成。