The idea is to ease test setup, diminish boilerplate code and fix current issues.
Note: package maplit = "1.0.2" is introducing hashmap! macro
Token account creation issue
There are multiple test suites where token accounts are created multiple times. It failed silently as all accounts were created within the same block. After using warp and changing clock time, token account creation fails for being already created.
Deadline issue
thread ... panicked at 'called `Result::unwrap()` on an `Err` value: RpcError(DeadlineExceeded)'
Tests they may trigger Deadline Exceeded errors. Hypothesis is that is it due to expired blockhash, error may trigger or not depending on solana version + tests execution time.
Fixed using warp_forward to move up the clock time.
Creates a new structure to handle test setup:
The idea is to ease test setup, diminish boilerplate code and fix current issues.
Note: package
maplit = "1.0.2"
is introducinghashmap!
macroToken account creation issue
There are multiple test suites where token accounts are created multiple times. It failed silently as all accounts were created within the same block. After using
warp
and changing clock time, token account creation fails for being already created.Deadline issue
Tests they may trigger Deadline Exceeded errors. Hypothesis is that is it due to expired blockhash, error may trigger or not depending on solana version + tests execution time.
Fixed using
warp_forward
to move up the clock time.