mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 09:47:56 +00:00
proc-macro: Timeout for tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user