Skip to main content

timeout

Attribute Macro timeout 

Source
#[timeout]
Expand description

Attribute macro that wraps an async test body with a WASM-compatible timeout.

This is a drop-in replacement for rstest’s #[timeout] that works on wasm32-unknown-unknown by using xmtp_common::time::timeout internally.

§Example

#[xmtp_common::test]
#[xmtp_common::timeout(std::time::Duration::from_secs(60))]
async fn test_something() { ... }