Skip to content

Fix flaky timestamp tests - #4046

Merged
frangio merged 11 commits into
OpenZeppelin:masterfrom
frangio:fix-flaky-timestamp
Feb 15, 2023
Merged

Fix flaky timestamp tests #4046
frangio merged 11 commits into
OpenZeppelin:masterfrom
frangio:fix-flaky-timestamp

Conversation

@frangio

@frangio frangio commented Feb 14, 2023

Copy link
Copy Markdown
Contributor

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

changeset-bot Bot commented Feb 14, 2023

Copy link
Copy Markdown

⚠️ 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

@Amxx Amxx left a comment

Copy link
Copy Markdown
Collaborator

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

frangio commented Feb 14, 2023

Copy link
Copy Markdown
Contributor Author

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

frangio commented Feb 14, 2023

Copy link
Copy Markdown
Contributor Author

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

@Amxx

Amxx commented Feb 15, 2023

Copy link
Copy Markdown
Collaborator

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

frangio commented Feb 15, 2023

Copy link
Copy Markdown
Contributor Author
Gas Reporter OZ Helpers Nomic Helpers
on 20m 35m
off 10m 22m

@Amxx

Amxx commented Feb 15, 2023

Copy link
Copy Markdown
Collaborator

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

frangio commented Feb 15, 2023

Copy link
Copy Markdown
Contributor Author

@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