1
0
Fork 0

Further improve error handling and increase timeout.

This commit is contained in:
Max Neunhoeffer 2017-06-07 10:19:29 +02:00
parent fbd8446562
commit 47a7e8e421
1 changed files with 4 additions and 2 deletions

View File

@ -85,7 +85,9 @@ function agencyTestSuite () {
res = request({url: agencyLeader + "/_api/agency/" + api,
method: "POST", followRedirect: false,
body: JSON.stringify(list),
headers: {"Content-Type": "application/json"}});
headers: {"Content-Type": "application/json"},
timeout: 120 /* essentially for the huge trx package
running under ASAN in the CI */ });
if(res.statusCode === 307) {
agencyLeader = res.headers.location;
var l = 0;
@ -103,7 +105,7 @@ function agencyTestSuite () {
try {
res.bodyParsed = JSON.parse(res.body);
} catch(e) {
require("console").error("Exception in body parse:", res.body, JSON.stringify(e), api, list);
require("console").error("Exception in body parse:", res.body, JSON.stringify(e), api, list, JSON.stringify(res));
}
return res;
}