Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Fix/testy rejections #4118

Merged
merged 3 commits into from
Jun 17, 2021
Merged

Fix/testy rejections #4118

merged 3 commits into from
Jun 17, 2021

Conversation

cds-amal
Copy link
Member

This PR fixes two tests that didn't account for unhandled promise rejections. I found this when a build failed and flagged these tests for failing CI

2021-06-16T18:00:09.1609218Z @truffle/core: UnhandledRejections detected
2021-06-16T18:00:09.1626964Z @truffle/core: Promise {
2021-06-16T18:00:09.1628102Z @truffle/core:   <rejected> ExtendableError: Could not find suitable configuration file.
2021-06-16T18:00:09.1629778Z @truffle/core:       at Function.detect (/home/runner/work/truffle/truffle/packages/config/src/index.ts:185:13)
2021-06-16T18:00:09.1631596Z @truffle/core:       at Object.run (/home/runner/work/truffle/truffle/packages/core/lib/commands/migrate.js:194:25)
2021-06-16T18:00:09.1633948Z @truffle/core:       at Command.run (/home/runner/work/truffle/truffle/packages/core/lib/command.js:167:33)
2021-06-16T18:00:09.1635235Z @truffle/core:       at Context.<anonymous> (/home/runner/work/truffle/truffle/packages/core/test/commands.js:52:15)
2021-06-16T18:00:09.1636611Z @truffle/core:       at callFn (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runnable.js:358:21)
2021-06-16T18:00:09.1638602Z @truffle/core:       at Test.Runnable.run (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runnable.js:346:5)
2021-06-16T18:00:09.1640194Z @truffle/core:       at Runner.runTest (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:621:10)
2021-06-16T18:00:09.1641587Z @truffle/core:       at /home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:745:12
2021-06-16T18:00:09.1642861Z @truffle/core:       at next (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:538:14)
2021-06-16T18:00:09.1643944Z @truffle/core:       at /home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:548:7
2021-06-16T18:00:09.1645023Z @truffle/core:       at next (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:430:14)
2021-06-16T18:00:09.1646245Z @truffle/core:       at Immediate.<anonymous> (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:516:5)
2021-06-16T18:00:09.1647317Z @truffle/core:       at processImmediate (internal/timers.js:462:21)
2021-06-16T18:00:09.1648312Z @truffle/core: } ExtendableError: Could not find suitable configuration file.
2021-06-16T18:00:09.1649892Z @truffle/core:     at Function.detect (/home/runner/work/truffle/truffle/packages/config/src/index.ts:185:13)
2021-06-16T18:00:09.1651227Z @truffle/core:     at Object.run (/home/runner/work/truffle/truffle/packages/core/lib/commands/migrate.js:194:25)
2021-06-16T18:00:09.1654304Z @truffle/core:     at Command.run (/home/runner/work/truffle/truffle/packages/core/lib/command.js:167:33)
2021-06-16T18:00:09.1655830Z @truffle/core:     at Context.<anonymous> (/home/runner/work/truffle/truffle/packages/core/test/commands.js:52:15)
2021-06-16T18:00:09.1657131Z @truffle/core:     at callFn (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runnable.js:358:21)
2021-06-16T18:00:09.1659374Z @truffle/core:     at Test.Runnable.run (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runnable.js:346:5)
2021-06-16T18:00:09.1660861Z @truffle/core:     at Runner.runTest (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:621:10)
2021-06-16T18:00:09.1662196Z @truffle/core:     at /home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:745:12
2021-06-16T18:00:09.1663520Z @truffle/core:     at next (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:538:14)
2021-06-16T18:00:09.1664591Z @truffle/core:     at /home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:548:7
2021-06-16T18:00:09.1665682Z @truffle/core:     at next (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:430:14)
2021-06-16T18:00:09.1666873Z @truffle/core:     at Immediate.<anonymous> (/home/runner/work/truffle/truffle/node_modules/mocha/lib/runner.js:516:5)
2021-06-16T18:00:09.1667945Z @truffle/core:     at processImmediate (internal/timers.js:462:21)
2021-06-16T18:00:09.2150790Z @truffle/core: error Command failed with exit code 1.

  - handle validation in catch block becuase test setup for `saveAll`
    will reject.
  - use node's `assert` instead of `assert.isTrue`
@cds-amal cds-amal merged commit 1d21792 into develop Jun 17, 2021
@cds-amal cds-amal deleted the fix/testy-rejections branch June 17, 2021 15:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants