This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
AP-745: Improve test speed by utilizing snapshot testing #359
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xNeshi
force-pushed
the
ap-745
branch
2 times, most recently
from
September 4, 2023 06:44
68bf3d2
to
807f60f
Compare
0xNeshi
changed the title
Ap 745: Refactor
Ap 745: Refactor Sep 4, 2023
IndexFund
tests to use snapshots -> data setup kept as-isIndexFund
tests to use snapshots -> data setup kept as-is (run time from 19 to 10 sec)
0xNeshi
changed the title
Ap 745: Refactor
Ap 745: Refactor Sep 4, 2023
IndexFund
tests to use snapshots -> data setup kept as-is (run time from 19 to 10 sec)IndexFund
(run time from 19 to 10 sec) and AccountsUpdate
(run time from 17 to 3 sec) tests to use snapshots
0xNeshi
changed the title
Ap 745: Refactor
Ap 745: Refactor Sep 4, 2023
IndexFund
(run time from 19 to 10 sec) and AccountsUpdate
(run time from 17 to 3 sec) tests to use snapshotsIndexFund
(19s -> 10s) and AccountsUpdate
(17s -> 3s) tests to use snapshots
0xNeshi
changed the title
Ap 745: Refactor
[WIP] Ap 745: Refactor Sep 4, 2023
IndexFund
(19s -> 10s) and AccountsUpdate
(17s -> 3s) tests to use snapshotsIndexFund
(19s -> 10s) and AccountsUpdate
(17s -> 3s) tests to use snapshots
0xNeshi
changed the title
[WIP] Ap 745: Refactor
[WIP] Ap 745: Improve test speed by utilizing snapshot testing
Sep 4, 2023
IndexFund
(19s -> 10s) and AccountsUpdate
(17s -> 3s) tests to use snapshots
Clever use of snapshotting! nciely done my dude |
The idea came to me in light of my frustrations about the need for long wait times to run tests locally |
stevieraykatz
approved these changes
Sep 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good. The PR is still marked WIP so I'll leave it uncommitted in case there are things you want to add.
The idea is to include updates to all tests in this PR |
0xNeshi
force-pushed
the
ap-745
branch
2 times, most recently
from
September 18, 2023 07:30
1a97461
to
288447c
Compare
0xNeshi
changed the title
[WIP] Ap 745: Improve test speed by utilizing snapshot testing
AP-745: Improve test speed by utilizing snapshot testing
Sep 19, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation of the solution
Test execution time reduced from ~40 mins to ~4 mins.
https://github.com/AngelProtocolFinance/evm-smart-contracts/actions/runs/6232872741/job/16916911877
https://github.com/AngelProtocolFinance/evm-smart-contracts/actions/runs/6233453856/job/16918716405
Instructions on making this work
yarn
oryarn install
to install npm dependenciesyarn compile clean
yarn test