Skip to content

Commit

Permalink
ci: rerun flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stringhandler committed Sep 13, 2021
1 parent 33b6d1c commit f9c3728
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ commands:
- run:
name: Run cucumber scenarios
no_output_timeout: 20m
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --tags "not @long-running and not @broken and not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retryTagFilter "@flaky" --parallel 3
command: cd integration_tests && mkdir -p cucumber_output && node_modules/.bin/cucumber-js --tags "not @long-running and not @broken and not @wallet-ffi" --format json:cucumber_output/tests.cucumber --exit --retry 2 --retryTagFilter "@flaky"
- run:
name: Generate report
command: cd integration_tests && node ./generate_report.js
Expand Down
9 changes: 6 additions & 3 deletions integration_tests/helpers/baseNodeProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { expect } = require("chai");
const fs = require("fs");
const path = require("path");
const BaseNodeClient = require("./baseNodeClient");
const { sleep, getFreePort } = require("./util");
const { getFreePort } = require("./util");
const dateFormat = require("dateformat");
const { createEnv } = require("./config");

Expand All @@ -28,15 +28,18 @@ class BaseNodeProcess {
this.name = `Basenode${this.port}-${this.name}`;
this.nodeFile = this.nodeFile || "nodeid.json";

let instance = 0;
do {
this.baseDir = `${this.options.baseDir}/${dateFormat(
new Date(),
"yyyymmddHHMM"
)}/${this.name}`;
)}/${instance}/${this.name}`;
// Some tests failed during testing because the next base node process started in the previous process
// directory therefore using the previous blockchain database
if (fs.existsSync(this.baseDir)) {
sleep(1000);
instance++;
} else {
fs.mkdirSync(this.baseDir);
}
} while (fs.existsSync(this.baseDir));
const args = ["--base-path", ".", "--init", "--create-id"];
Expand Down

0 comments on commit f9c3728

Please sign in to comment.