fix(cli): wait for deployed programs before running tests#4669
Open
raushan728 wants to merge 9 commits into
Open
fix(cli): wait for deployed programs before running tests#4669raushan728 wants to merge 9 commits into
raushan728 wants to merge 9 commits into
Conversation
|
@raushan728 is attempting to deploy a commit to the OtterSec Team on Vercel. A member of the Team first needs to authorize it. |
fdfec08 to
e9b31c9
Compare
jamie-osec
reviewed
Jun 15, 2026
jamie-osec
reviewed
Jun 15, 2026
0x4ka5h
requested changes
Jun 16, 2026
0x4ka5h
left a comment
Collaborator
There was a problem hiding this comment.
seems like negative startup_wait values now turn into an effectively infinite wait in the new readiness helper.
0x4ka5h
previously approved these changes
Jun 16, 2026
This comment was marked as outdated.
This comment was marked as outdated.
jamie-osec
reviewed
Jun 22, 2026
jamie-osec
reviewed
Jun 22, 2026
This comment was marked as outdated.
This comment was marked as outdated.
0x4ka5h
previously approved these changes
Jun 23, 2026
jamie-osec
reviewed
Jun 23, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #3624
anchor testwas checking validator readiness by pollingget_latest_blockhash(). This returns as soon as the RPC server accepts connections well before BPF programs are actually deployed on-chain. Tests would fire immediately after and hit "Program is not deployed".startup_waitin Anchor.toml also had no real effect since the loop broke early regardless of the configured value.Changes:
wait_for_validator_ready()get_multiple_accounts()until all deployed programs return an executable account--bpf-program/--upgradeable-programflags passed to the validator, so[programs.localnet]address overrides in Anchor.toml are respected correctlystartup_waitSTARTUP_WAITdefault from 5000ms to 30000ms to account for program deployment time on top of RPC livenessms_waitchanged to u64 negative startup_wait values are now rejected with an error at the call site viau64::try_from