proc-macro: Timeout for tests

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2024-03-01 20:20:14 +02:00
parent 88ccc54339
commit b6c98c7fa0
6 changed files with 124 additions and 0 deletions
@@ -11,3 +11,14 @@ pub use context::*;
pub use node_proc::TestNodeProcess;
pub use tx_retries::*;
pub use wait_for_blocks::*;
pub use integration_tests_proc_macro::subxt_test;
/// The test timeout is set to 1 second.
/// However, the test is sleeping for 5 seconds.
/// This must cause the test to panic.
#[subxt_test(timeout = 1)]
#[should_panic]
async fn test_subxt_macro() {
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
}