8000 Bug fix/tests cleanup by jsteemann · Pull Request #11028 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Bug fix/tests cleanup #11028

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 5 commits into from
Feb 3, 2020
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
Next Next commit
make http_replication tests clean up their collections
  • Loading branch information
jsteemann committed Jan 30, 2020
commit 4d317798e354340550be9edfa4bf2b62bcdf6b6e
14 changes: 7 additions & 7 deletions js/client/modules/@arangodb/result-processing.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,11 @@ ${failedMessages}${color} * Overall state: ${statusMessage}${RESET}${crashText}$
if (crashedText !== '') {
onlyFailedMessages += '\n' + crashedText;
}
fs.write(options.testOutputDirectory + options.testFailureText, onlyFailedMessages);
fs.write(fs.join(options.testOutputDirectory, options.testFailureText), onlyFailedMessages);

if (cu.GDB_OUTPUT !== '' && options.crashAnalysisText !== options.testFailureText ) {
// write more verbose failures to the testFailureText file
fs.write(options.testOutputDirectory + options.crashAnalysisText, cu.GDB_OUTPUT);
fs.write(fs.join(options.testOutputDirectory, options.crashAnalysisText), cu.GDB_OUTPUT);
}

}
Expand Down Expand Up @@ -768,8 +768,8 @@ function locateShortServerLife(options, results) {
// //////////////////////////////////////////////////////////////////////////////

function writeDefaultReports(options, testSuites) {
fs.write(options.testOutputDirectory + '/UNITTEST_RESULT_EXECUTIVE_SUMMARY.json', "false", true);
fs.write(options.testOutputDirectory + '/UNITTEST_RESULT_CRASHED.json', "true", true);
fs.write(fs.join(options.testOutputDirectory, 'UNITTEST_RESULT_EXECUTIVE_SUMMARY.json'), "false", true);
fs.write(fs.join(options.testOutputDirectory, 'UNITTEST_RESULT_CRASHED.json'), "true", true);
let testFailureText = 'testfailures.txt';
if (options.hasOwnProperty('testFailureText')) {
testFailureText = options.testFailureText;
Expand All @@ -781,8 +781,8 @@ function writeDefaultReports(options, testSuites) {
}

function writeReports(options, results) {
fs.write(options.testOutputDirectory + '/UNITTEST_RESULT_EXECUTIVE_SUMMARY.json', String(results.status), true);
fs.write(options.testOutputDirectory + '/UNITTEST_RESULT_CRASHED.json', String(results.crashed), true);
fs.write(fs.join(options.testOutputDirectory, 'UNITTEST_RESULT_EXECUTIVE_SUMMARY.json'), String(results.status), true);
fs.write(fs.join(options.testOutputDirectory, 'UNITTEST_RESULT_CRASHED.json'), String(results.crashed), true);
}

function dumpAllResults(options, results) {
Expand All @@ -794,7 +794,7 @@ function dumpAllResults(options, results) {
j = inspect(results);
}

fs.write(options.testOutputDirectory + '/UNITTEST_RESULT.json', j, true);
fs.write(fs.join(options.testOutputDirectory, 'UNITTEST_RESULT.json'), j, true);
}


Expand Down
2 changes: 1 addition & 1 deletion js/client/modules/@arangodb/testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const optionsDefaults = {
'storageEngine': 'rocksdb',
'test': undefined,
'testBuckets': undefined,
'testOutputDirectory': 'out/',
'testOutputDirectory': 'out',
'useReconnect': true,
'username': 'root',
'valgrind': false,
Expand Down
9 changes: 8 additions & 1 deletion tests/rb/HttpReplication/api-replication-global-spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,16 @@
################################################################################

context "dealing with wal access api" do

api = "/_api/wal"
prefix = "api-wal"

before do
ArangoDB.drop_collection("UnitTestsReplication")
end

after do
ArangoDB.drop_collection("UnitTestsReplication")
end

################################################################################
## state
Expand Down
15 changes: 15 additions & 0 deletions tests/rb/HttpReplication/api-replication-mmfiles-spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@

8000 context "dealing with the logger" do

before do
ArangoDB.drop_collection("UnitTestsReplication")
end

after do
ArangoDB.drop_collection("UnitTestsReplication")
end

################################################################################
## state
################################################################################
Expand Down Expand Up @@ -1448,6 +1456,13 @@
################################################################################

context "dealing with the logger" do
before do
ArangoDB.drop_collection("UnitTestsReplication")
end

after do
ArangoDB.drop_collection("UnitTestsReplication")
end

################################################################################
## state
Expand Down
14 changes: 14 additions & 0 deletions tests/rb/HttpReplication/api-replication-rocksdb-spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,13 @@
################################################################################

context "dealing with the logger" do
before do
ArangoDB.drop_collection("UnitTestsReplication")
end

after do
ArangoDB.drop_collection("UnitTestsReplication")
end

################################################################################
## state
Expand Down Expand Up @@ -1413,6 +1420,13 @@
################################################################################

context "dealing with the logger" do
before do
ArangoDB.drop_collection("UnitTestsReplication")
end

after do
ArangoDB.drop_collection("UnitTestsReplication")
end

################################################################################
## state
Expand Down
0