-
Notifications
You must be signed in to change notification settings - Fork 76
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: dotenv test is flaky #1340
Conversation
fixes: stellar#1335 This is currently blocking CI and failing on main. Given that clap handles ensuring that CLI args have higher priority than ENV vars, this test is more of a sanity check so it could also just be removed.
@leighmcculloch This is definitely a bad code smell and deserves an investigation why sleeps fix the concurrency issue, but do you think it's fine to just let it pass for now since it's a blocker for other PRs? |
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.
Looks good, just going to strip out changes that seem unrelated.
There's not much point removing this test because other tests have sleeps too. There's something up with the cost to do txns and the resources required which are racing and getting it wrong. Likely because we're reusing the same account over and over. In other projects where we use a live network we create new accounts on every test, so the tests can run entirely isolate each other. That's the fix we need I think. |
Each test should be a different account. It's just in this case they are all trying to deploy the same contract... But so do other tests so I'm really at a loss for the cause. |
I was too specific, the creation of a resource that has a different resource usage on first creation vs update. Accounts are a common culprit, but the WASM install / contract deploy would be similar. |
One way to see if that would fix it and allow us to get rid of the sleeps, would be to make the .wasm files unique for each test. Which can be done by writing some random data into a custom section of the wasm:
|
Great idea! Though I'm wondering if perhaps we can instead change the install step to first check if the ledger entry exists. Though this too could run into a race condition. So I will look into using |
fixes: #1335
This is currently blocking CI and failing on main. Given that clap handles ensuring that CLI args have higher priority than ENV vars, this test is more of a sanity check so it could also just be removed.