Skip to content
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

Add E2E Mosaic test #3274

Merged
merged 5 commits into from
Dec 16, 2019
Merged

Add E2E Mosaic test #3274

merged 5 commits into from
Dec 16, 2019

Conversation

cgewecke
Copy link
Collaborator

@cgewecke cgewecke commented Dec 15, 2019

Description

In #3266, larger Solidity contract unit test suites that use Web3 are seeing random crashes and poor performance using Web3 >= 1.2.2. Believe this bug is at Truffle ... (see truffle 2688)

PR models that use-case by virtually publishing Web3 and running the unit tests of a fork of mosaicdao/mosaic-1. The project was selected because it reported the same bug and it's relatively small (~300 unit tests).

The fork is adapted to use the Buidler test runner instead of Truffle. The change-set for those modifications can be seen here.

Truffle is quite complex and ships as a web-packed bundle. It's also downgraded Web3 to 1.2.1 and the latest state of Web3 does not install there because recent TS fixes at Truffle were reverted.

Buidler is simpler / more modular and allows us to use yarn resolutions to coerce all nested web3 packages in the target project to the one we want.

This is a useful replacement for the (now) broken Truffle E2E test as well.

Proofs that the test correctly uses virtually published Web3

Fixes #3266

Type of change

  • Test (non-breaking change)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:unit with success and extended the tests if necessary.
  • I ran npm run build-all and tested the resulting file/'s from dist folder in a browser.
  • I have updated the CHANGELOG.md file in the root folder.
  • I have tested my code on the live network.

@coveralls
Copy link

coveralls commented Dec 15, 2019

Coverage Status

Coverage remained the same at 84.802% when pulling 54f6eeb on ci/e2e-mosaic into 4689592 on 1.x.

@cgewecke cgewecke added 1.x 1.0 related issues CI labels Dec 15, 2019
@cgewecke cgewecke marked this pull request as ready for review December 16, 2019 04:53
@cgewecke cgewecke added the Review Needed Maintainer(s) need to review label Dec 16, 2019
@cgewecke cgewecke requested a review from nivida December 16, 2019 04:53
@@ -0,0 +1,56 @@
# -------------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Well documented here! Nice!

Copy link
Contributor

@nivida nivida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@nivida nivida removed the Review Needed Maintainer(s) need to review label Dec 16, 2019
@nivida nivida merged commit 4d57461 into 1.x Dec 16, 2019
@nivida nivida deleted the ci/e2e-mosaic branch December 19, 2019 09:04
@cgewecke cgewecke mentioned this pull request Jan 11, 2020
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug truffle issue 2654 (random ganache disconnection)
3 participants