10000 Add new chaos test suite. by mpoeter · Pull Request #14406 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Add new chaos test suite. #14406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove debug print and simplify require of local inc files.
  • Loading branch information
mpoeter committed Jun 28, 2021
commit 3d1e7280666f1de1ef4466028ba5f68d176ce05e
9 changes: 9 additions & 0 deletions js/client/modules/@arangodb/testutils/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,17 @@ function performTests (options, testList, testname, runFn, serverOptions, startS
startStopHandlers.preRun(te);
}
pu.getMemProfSnapshot(instanceInfo, options, memProfCounter++);

const _NODE_PATH = process.env.NODE_PATH;
// Add the testcase's directory to the path so we can use `require` with
// relative paths (e.g., `require("./helpers.inc")`).
process.env.NODE_PATH += ':' + fs.dirname(te);

print('\n' + (new Date()).toISOString() + GREEN + " [============] " + runFn.info + ': Trying', te, '...', RESET);
let reply = runFn(options, instanceInfo, te, env);

// Restore NODE_PATH
process.env.NODE_PATH = _NODE_PATH;

if (reply.hasOwnProperty('forceTerminate')) {
results[te] = reply;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
/// @author Manuel Pöter
////////////////////////////////////////////////////////////////////////////////

const base = require("fs").join(require('internal').pathForTesting('client'), 'chaos', 'test-chaos-load-common.inc');
print(base);
const { run, makeConfig, parameters } = require(base);
const { run, makeConfig, parameters } = require("./test-chaos-load-common.inc");

module.exports.getConfigs = () => {
let configs = [];
Expand Down
3 changes: 1 addition & 2 deletions tests/js/client/chaos/test-module-chaos-load-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
/// @author Manuel Pöter
////////////////////////////////////////////////////////////////////////////////

const base = require("fs").join(require('internal').pathForTesting('client'), 'chaos', 'test-chaos-load-common.inc');
const { run, makeConfig, parameters } = require(base);
const { run, makeConfig, parameters } = require("./test-chaos-load-common.inc");

module.exports.getConfigs = () => [makeConfig(Array(parameters.length).fill(true))];
module.exports.run = run;
0