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

[Bug] Test runs before the validator is ready #104

Open
notdanilo opened this issue Nov 30, 2024 · 3 comments
Open

[Bug] Test runs before the validator is ready #104

notdanilo opened this issue Nov 30, 2024 · 3 comments
Labels
bug Something isn't working priority: medium

Comments

@notdanilo
Copy link
Contributor

Describe the bug

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

might run before the validator is ready with all the test setup.

To Reproduce
Run bolt test several times until it happens :) it's an intermittent failure

Expected behavior
Consistent tests

Screenshots

       InitializeNewWorld:
     Error: Simulation failed. 
Message: Transaction simulation failed: Error processing Instruction 0: invalid account data for instruction. 
Logs: 
[
  "Program WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n invoke [1]",
  "Program is not deployed",
  "Program WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n failed: invalid account data for instruction"
]. 
Catch the `SendTransactionError` and call `getLogs()` on it for full details.
      at Connection.sendEncodedTransaction (node_modules/@solana/web3.js/src/connection.ts:6045:13)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at Connection.sendRawTransaction (node_modules/@solana/web3.js/src/connection.ts:6001:20)
      at sendAndConfirmRawTransaction (node_modules/@coral-xyz/anchor/src/provider.ts:377:21)
      at AnchorProvider.sendAndConfirm (node_modules/@coral-xyz/anchor/src/provider.ts:163:14)
@notdanilo notdanilo added the bug Something isn't working label Nov 30, 2024
@notdanilo
Copy link
Contributor Author

I am working around this locally by replacing the test command with sleep 5 && yarn .... I might push it if I don't find any better solution

@notdanilo
Copy link
Contributor Author

This can be really annoying for newcomers. I might include the workaround in the template asap

@notdanilo
Copy link
Contributor Author

An important note is that [test] startup_wait = 5000 is supposed to fix that, but it doesn't have any effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: medium
Projects
None yet
Development

No branches or pull requests

1 participant