-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
bug(forge test
): --isolate
does not work as expected with setUp()
#9564
Labels
Comments
cc @klkvr |
forge test
): --isolate
does not work as expected with setUp()
@zerosnacks , pretty sure it's not related to Both cases have the exact same
|
@sakulstra mind to check if same when using before test setups? https://book.getfoundry.sh/forge/writing-tests#before-test-setups This should ensure before test setups are different txes than the test one |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (59f354c 2024-12-11T00:29:25.224313000Z)
What command(s) is the bug in?
forge test --isolate
Operating System
macOS (Apple Silicon)
Describe the bug
Hello, i'm trying to improve the gas tests on the aave-dao repository atm and am facing an issue with isolation.
As far as i can understand the isolate flag should isolate top level calls from the test setup, when i test gas usage of the
getUserAccountData
method, it seems like it is in fact getting affected by the test setup.In case one the setUp did not yet touch the aave oracle, so fetching the price via
AaveOracle::getAssetPrice(USDX: [0xffD4505B3452Dc22f8473616d50503bA9E1710Ac])
costs[7865]
gas.In the second case the setUp did borrow some assets, which in turn will fetch oracle prices for validation. Due to storage hotness the cost dropped to
[1365]
.Case 1:
Case 2:
The text was updated successfully, but these errors were encountered: