1
0
Fork 0

backport testing changes (#7127)

This commit is contained in:
Wilfried Goesgens 2018-10-30 19:04:11 +01:00 committed by Jan
parent 87c4d99eea
commit be556b7262
4 changed files with 22 additions and 20 deletions

View File

@ -381,7 +381,7 @@ function makeArgsArangod (options, appDir, role, tmpDir) {
function runProcdump (options, instanceInfo, rootDir, pid) { function runProcdump (options, instanceInfo, rootDir, pid) {
let procdumpArgs = [ ]; let procdumpArgs = [ ];
let dumpFile = fs.join(rootDir, 'core_'+pid + '.dmp'); let dumpFile = fs.join(rootDir, 'core_' + pid + '.dmp');
if (options.exceptionFilter != null) { if (options.exceptionFilter != null) {
procdumpArgs = [ procdumpArgs = [
'-accepteula', '-accepteula',
@ -499,11 +499,6 @@ function executeAndWait (cmd, args, options, valgrindTest, rootDir, circumventCo
(platform.substr(0, 3) === 'win') (platform.substr(0, 3) === 'win')
) )
) { ) {
let instanceInfo = {
rootDir: rootDir,
pid: res.pid,
exitStatus: res
};
print("executeAndWait: Marking crashy - " + JSON.stringify(instanceInfo)); print("executeAndWait: Marking crashy - " + JSON.stringify(instanceInfo));
crashUtils.analyzeCrash(cmd, crashUtils.analyzeCrash(cmd,
instanceInfo, instanceInfo,
@ -1367,11 +1362,11 @@ function startInstance (protocol, options, addArgs, testname, tmpDir) {
try { try {
if (options.hasOwnProperty('server')) { if (options.hasOwnProperty('server')) {
let rc = { let rc = {
endpoint: options.server, endpoint: options.server,
rootDir: options.serverRoot, rootDir: options.serverRoot,
url: options.server.replace('tcp', 'http'), url: options.server.replace('tcp', 'http'),
arangods: [] arangods: []
}; };
arango.reconnect(rc.endpoint, '_system', 'root', ''); arango.reconnect(rc.endpoint, '_system', 'root', '');
return rc; return rc;
} else if (options.cluster || options.activefailover) { } else if (options.cluster || options.activefailover) {

View File

@ -654,7 +654,7 @@ function iterateTests(cases, options, jsonReply) {
} else { } else {
print('not cleaning up as some tests weren\'t successful:\n' + print('not cleaning up as some tests weren\'t successful:\n' +
pu.getCleanupDBDirectories() + pu.getCleanupDBDirectories() +
cleanup + ' - ' + globalStatus + ' - ' + pu.serverCrashed); cleanup + ' - ' + globalStatus + ' - ' + pu.serverCrashed);
} }
} else { } else {
print("not cleaning up since we didn't start the server ourselves\n"); print("not cleaning up since we didn't start the server ourselves\n");

View File

@ -152,17 +152,18 @@ function recovery (options) {
let filtered = {}; let filtered = {};
let localOptions = _.cloneDeep(options); let localOptions = _.cloneDeep(options);
let disableMonitor = localOptions.disableMonitor; let disableMonitor = localOptions.disableMonitor;
if (tu.filterTestcaseByOptions(test, localOptions, filtered)) { if (tu.filterTestcaseByOptions(test, localOptions, filtered)) {
let instanceInfo = { let instanceInfo = {
rootDir: pu.UNITTESTS_DIR rootDir: pu.UNITTESTS_DIR
}; };
count += 1; count += 1;
localOptions.disableMonitor = true;
print(BLUE + "running setup of " + test + RESET); print(BLUE + "running setup of " + test + RESET);
localOptions.disableMonitor = true;
runArangodRecovery(instanceInfo, localOptions, test, true, count); runArangodRecovery(instanceInfo, localOptions, test, true, count);
localOptions.disableMonitor = disableMonitor; localOptions.disableMonitor = disableMonitor;
print(BLUE + "running recovery of " + test + RESET); print(BLUE + "running recovery of " + test + RESET);
results[test] = runArangodRecovery(instanceInfo, localOptions, test, false, count); results[test] = runArangodRecovery(instanceInfo, localOptions, test, false, count);
@ -178,7 +179,6 @@ function recovery (options) {
} }
} }
} }
process.env.TMPDIR = orgTmp; process.env.TMPDIR = orgTmp;
if (count === 0) { if (count === 0) {
results['ALLTESTS'] = { results['ALLTESTS'] = {

View File

@ -1,4 +1,5 @@
/* jshint strict: false, sub: true */ /* jshint strict: false, sub: true */
/* global print */
'use strict'; 'use strict';
// ////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////
@ -81,7 +82,8 @@ function replicationFuzz (options) {
customInstanceInfos, customInstanceInfos,
startStopHandlers) { startStopHandlers) {
let message; let message;
let slave = pu.startInstance('tcp', options, {}, 'slave_sync'); print("starting replication slave: ");
let slave = pu.startInstance('tcp', options, {}, 'slave_fuzz');
let state = (typeof slave === 'object'); let state = (typeof slave === 'object');
if (state) { if (state) {
@ -149,7 +151,8 @@ function replicationRandom (options) {
customInstanceInfos, customInstanceInfos,
startStopHandlers) { startStopHandlers) {
let message; let message;
let slave = pu.startInstance('tcp', options, {}, 'slave_sync'); print("starting replication slave: ");
let slave = pu.startInstance('tcp', options, {}, 'slave_random');
let state = (typeof slave === 'object'); let state = (typeof slave === 'object');
if (state) { if (state) {
@ -218,7 +221,8 @@ function replicationAql (options) {
customInstanceInfos, customInstanceInfos,
startStopHandlers) { startStopHandlers) {
let message; let message;
let slave = pu.startInstance('tcp', options, {}, 'slave_sync'); print("starting replication slave: ");
let slave = pu.startInstance('tcp', options, {}, 'slave_aql');
let state = (typeof slave === 'object'); let state = (typeof slave === 'object');
if (state) { if (state) {
@ -290,6 +294,7 @@ function replicationOngoing (options) {
customInstanceInfos, customInstanceInfos,
startStopHandlers) { startStopHandlers) {
let message; let message;
print("starting replication slave: ");
let slave = pu.startInstance('tcp', options, {}, 'slave_ongoing'); let slave = pu.startInstance('tcp', options, {}, 'slave_ongoing');
let state = (typeof slave === 'object'); let state = (typeof slave === 'object');
@ -363,6 +368,7 @@ function replicationStatic (options) {
startStopHandlers) { startStopHandlers) {
let message; let message;
let res = true; let res = true;
print("starting replication slave: ");
let slave = pu.startInstance('tcp', options, {}, 'slave_static'); let slave = pu.startInstance('tcp', options, {}, 'slave_static');
let state = (typeof slave === 'object'); let state = (typeof slave === 'object');
@ -459,7 +465,8 @@ function replicationSync (options) {
startStopHandlers) { startStopHandlers) {
let message; let message;
let res = true; let res = true;
let slave = pu.startInstance('tcp', options, {}, 'slave_sync'); print("starting replication slave: ");
let slave = pu.startInstance('tcp', options, {"log.level" : "replication=trace", "--log.level": "replication=trace"}, 'slave_sync');
let state = (typeof slave === 'object'); let state = (typeof slave === 'object');
if (state) { if (state) {