Reputation: 17
Anyone able to guide me on why I can be getting this error on my tests?
The #[tokio::test] macro requires rt or rt-multi-thread.
It is more a Rust question than a Solana one, but I have been following the examples (and I am learning Rust), so just felt here would be a good place to post hte quesiton.
I have solana-program-test = "1.6.2"
.
Upvotes: -2
Views: 2460
Reputation: 805
You cargo.toml should have tokio
and tokio-test
tokio = { version = "1.24.2", features = ["full"] }
tokio-test ="0.4.2"
This will install the optional rt-multi-thread
dependency.
Upvotes: 0
Reputation: 16
Hrm... I'm not sure then. Maybe try adding https://github.com/solana-labs/solana/blob/364af3a3e01e258694e16aed57838d36305aa9c3/program-test/Cargo.toml#L25 explicitly?
Under dev-dependencies
though.
Upvotes: 0