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

Fix flaky timestamp tests #4046

Merged
merged 11 commits into from
Feb 15, 2023
Merged

Conversation

frangio
Copy link
Contributor

@frangio frangio commented Feb 14, 2023

They are due to an how OpenZeppelin Test Helpers implements time.increaseTo. We should prefer Hardhat's own network helpers (eventually we should migrate the rest of the test suite).

I also included a small refactor of .then in the Governor helper.

Fixes #4049

@changeset-bot
Copy link

changeset-bot bot commented Feb 14, 2023

⚠️ No Changeset found

Latest commit: cdb4f12

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Amxx
Amxx previously approved these changes Feb 14, 2023
Copy link
Collaborator

@Amxx Amxx left a comment

Choose a reason for hiding this comment

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

Awesome !

@frangio frangio enabled auto-merge (squash) February 14, 2023 21:05
@frangio
Copy link
Contributor Author

frangio commented Feb 14, 2023

The test suite is going a lot slower than before. Is it due to this PR?

@frangio frangio marked this pull request as draft February 14, 2023 23:50
@frangio
Copy link
Contributor Author

frangio commented Feb 14, 2023

Test suite took twice the time it usually takes. I'm disabling gas reporting to see if it helps.

@Amxx
Copy link
Collaborator

Amxx commented Feb 15, 2023

Test suite took twice the time it usually takes. I'm disabling gas reporting to see if it helps.

gas report definitelly making all tests WAY slower

@frangio frangio force-pushed the fix-flaky-timestamp branch from 9283c05 to 49ccb68 Compare February 15, 2023 14:22
@frangio
Copy link
Contributor Author

frangio commented Feb 15, 2023

Gas Reporter OZ Helpers Nomic Helpers
on 20m 35m
off 10m 22m

@Amxx
Copy link
Collaborator

Amxx commented Feb 15, 2023

It made sens that d79c2ec would fix the issue of flaky timestamps, but I'm not sure how we expect the current version of the PR to do anything since the behavior for timestamps in helper/time.js is no longer part of the diff.

@frangio
Copy link
Contributor Author

frangio commented Feb 15, 2023

@Amxx I'm just trying things out to debug the test time degradation.

@frangio frangio marked this pull request as ready for review February 15, 2023 22:07
@frangio frangio merged commit 4ff538a into OpenZeppelin:master Feb 15, 2023
@frangio frangio deleted the fix-flaky-timestamp branch February 15, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible race condition in GovernorPreventLateQuorum tests
2 participants