Solana: Test suite not idempotent — 3 failures when tests share validator state #63
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Branch: feat/solana-integration\nResults: 12/15 pass, 3 fail\n\nRoot cause: Multiple test files share the same validator state. cancel_flow or deposit_withdraw 'before' hooks initialize the bridge PDA before bridge.test.ts runs, so:\n\n1. 'initializes bridge config' — fails with 0x0 (PDA already exists)\n2. 'rejects invalid fee bps' — fails because error is 'account in use' not 'InvalidFeeBps'\n3. 'registers a chain' — fails because chain PDA already registered\n\nThese cascade to fail cancel_flow and deposit_withdraw 'before all' hooks (5 total failures shown).\n\nEach file passes individually. The issue only appears running all files together.\n\nSuggested fix: Either add idempotent init (check if PDA exists before init) or ensure test execution order with mocha --sort, or move initialize to a shared before hook.
mentioned in commit
bc4cecc324@Brouie Please review and confirm fix