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

test: share compilation step to avoid race condition #9

Merged
merged 2 commits into from
Sep 13, 2021
Merged

Conversation

gakonst
Copy link
Member

@gakonst gakonst commented Sep 13, 2021

There seems to be a race condition the first time the compilers are installed which makes later running the compilation step fail with:

Installing 0.7.6
Done!
thread 'tests::failing_solidity_unit_test' panicked at '`"/home/runner/.svm/0.7.6/solc-0.7.6"` not found', /home/runner/.cargo/git/checkouts/ethers-rs-c3a7c0a0ae0fe6be/64294d1/ethers-core/src/utils/solc.rs:240:33
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This is fixed by running the compilation step once and then re-using the value across tests.

I wonder why this is happening. Possibly due to some overwrite inside install when called multiple times in parallel?

@gakonst gakonst force-pushed the chore/fix-ci branch 2 times, most recently from f3f10a2 to e6d2954 Compare September 13, 2021 21:33
@gakonst gakonst changed the title chore: update ethers fix: re-use tokio runtime when blocking instead of re-instantiating Sep 13, 2021
@gakonst gakonst changed the title fix: re-use tokio runtime when blocking instead of re-instantiating test: share compilation step to avoid race condition Sep 13, 2021
@gakonst gakonst merged commit a31e7eb into master Sep 13, 2021
@gakonst gakonst deleted the chore/fix-ci branch September 13, 2021 21:48
pistomat pushed a commit to pistomat/foundry that referenced this pull request Aug 14, 2023
fix(anvil): disable basefee if manually set to 0 (foundry-rs#5126)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant