Skip to content

Commit

Permalink
Merge pull request #56 from 0xPolygonHermez/feature/fix-sample-tests
Browse files Browse the repository at this point in the history
update sample parallel tests
  • Loading branch information
krlosMata authored Nov 29, 2023
2 parents 294ed17 + 414ed5b commit 6dced5f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tools/parallel-tests-sample/sample.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ const checkerDir = path.join(__dirname, 'checker.txt');
const inputPath = '%%INPUT_PATH%%';
const nameFile = path.basename(inputPath);
const input = JSON.parse(fs.readFileSync(inputPath, 'utf8'));
const stepRetries = 3;
let currentTries = 0;

it(`${nameFile}`, async () => {
if (fs.existsSync(checkerDir)) {
Expand Down Expand Up @@ -59,10 +57,8 @@ async function runTest(cmPols, steps) {
await smMain.execute(cmPols.Main, input, rom, config);
} catch (err) {
// If fails for ooc, retry increasing stepsN up to three times
if (err.toString().includes('OOC') && currentTries < stepRetries) {
currentTries += 1;
counters = true;
await runTest(cmPols, steps * 2);
if (inputPath.includes('invalid-batch')) {
expect(input.oldStateRoot).to.be.equal(input.newStateRoot);

return;
}
Expand Down

0 comments on commit 6dced5f

Please sign in to comment.