8000 Bug fix-3.7/begin trx disjoint (#14641) by mchacki · Pull Request #14649 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
8000
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert JSUnity improvement, testCase names now need to be unique per …
…file again. :sad: (#14659)
  • Loading branch information
mchacki committed Aug 20, 2021
commit 09844459ae23c54120b51ab70023b5a955bf632c
19 changes: 8 additions & 11 deletions js/common/modules/jsunity.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,31 +278,28 @@ function Run (testsuite) {
PASSED += result.passed;
FAILED += result.failed;
DURATION += result.duration;
COMPLETE[suite.suiteName] = COMPLETE[suite.suiteName] || {};

let duplicates = [];
// Reference will be modified within complete
let cmpl = COMPLETE[suite.suiteName];
for (var attrname in RESULTS) {
if (typeof(RESULTS[attrname]) === 'number') {
if (!cmpl.hasOwnProperty(attrname)) {
cmpl[attrname] = { };
if (!COMPLETE.hasOwnProperty(attrname)) {
COMPLETE[attrname] = { };
}
cmpl[attrname] = RESULTS[attrname];
COMPLETE[attrname][suite.suiteName] = RESULTS[attrname];
} else if (RESULTS.hasOwnProperty(attrname)) {
if (cmpl.hasOwnProperty(attrname)) {
if (COMPLETE.hasOwnProperty(attrname)) {
if (attrname === 'message') {
cmpl[attrname] += "\n\n" + RESULTS[attrname];
COMPLETE[attrname] += "\n\n" + RESULTS[attrname];
continue;
}
print("Duplicate testcase '" + suite.suiteName + "::" + attrname + "' - already have: " + JSON.stringify(cmpl[attrname]) + "");
print("Duplicate testsuite '" + attrname + "' - already have: " + JSON.stringify(COMPLETE[attrname]) + "");
duplicates.push(attrname);
}
cmpl[attrname] = RESULTS[attrname];
COMPLETE[attrname] = RESULTS[attrname];
}
}
if (duplicates.length !== 0) {
throw("Duplicate testcase '" + duplicates + "'");
throw("Duplicate testsuite '" + duplicates + "'");
}
return result;
}
Expand Down
0