1
0
Fork 0

fix 6561f21536 - only abort on timeout, not regular exit failures (#9434)

* fix 6561f21536 - only abort on timeout, not regular exit failures

* make pre-check exception distinguishable, its got no ready existing test status
This commit is contained in:
Wilfried Goesgens 2019-07-10 17:48:46 +02:00 committed by KVS85
parent 468a334894
commit 623048aff8
2 changed files with 9 additions and 3 deletions

View File

@ -604,6 +604,7 @@ function executeAndWait (cmd, args, options, valgrindTest, rootDir, circumventCo
const startTime = time();
if ((typeof (cmd) !== 'string') || (cmd === 'true') || (cmd === 'false')) {
return {
timeout: false,
status: false,
message: 'true or false as binary name for test cmd =' + cmd + 'args =' + args
};
@ -631,6 +632,7 @@ function executeAndWait (cmd, args, options, valgrindTest, rootDir, circumventCo
instanceInfo.exitStatus.status = 'ABORTED';
const deltaTime = time() - startTime;
return {
timeout: true,
status: false,
message: 'irregular termination by TIMEOUT',
duration: deltaTime
@ -680,12 +682,14 @@ function executeAndWait (cmd, args, options, valgrindTest, rootDir, circumventCo
if (instanceInfo.exitStatus.exit === 0) {
return {
timeout: false,
status: true,
message: '',
duration: deltaTime
};
} else {
return {
timeout: false,
status: false,
message: 'exit code was ' + instanceInfo.exitStatus.exit,
duration: deltaTime
@ -701,6 +705,7 @@ function executeAndWait (cmd, args, options, valgrindTest, rootDir, circumventCo
' Time elapsed: ' + deltaTime + errorMessage);
return {
timeout: false,
status: false,
message: 'irregular termination: ' + instanceInfo.exitStatus.status +
' exit signal: ' + instanceInfo.exitStatus.signal + errorMessage,
@ -716,6 +721,7 @@ function executeAndWait (cmd, args, options, valgrindTest, rootDir, circumventCo
' Time elapsed: ' + deltaTime + errorMessage);
return {
timeout: false,
status: false,
message: 'irregular termination: ' + instanceInfo.exitStatus.status +
' exit code: ' + instanceInfo.exitStatus.exit + errorMessage,

View File

@ -188,7 +188,7 @@ function performTests (options, testList, testname, runFn, serverOptions, startS
catch (x) {
results[te] = {
status: false,
message: 'failed to fetch the currently available collections: ' + x.message + '. Original test status: ' + JSON.stringify(results[te])
message: 'failed to fetch the previously available collections: ' + x.message
};
continueTesting = false;
serverDead = true;
@ -909,9 +909,9 @@ function runInRSpec (options, instanceInfo, file, addArgs) {
args = [rspec].concat(args);
}
const res = pu.executeAndWait(command, args, options, 'arangosh', instanceInfo.rootDir, false, false, options.oneTestTimeout);
const res = pu.executeAndWait(command, args, options, 'rspec', instanceInfo.rootDir, false, false, options.oneTestTimeout);
if (!res.status) {
if (!res.status && res.timeout) {
return {
total: 0,
failed: 1,