global timeout in e2e test

This commit is contained in:
Igor Katson 2024-08-19 12:08:46 +01:00
parent 60f831bc6f
commit 6e92eec167
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -18,8 +18,16 @@ use crate::{
AddTorrentOptions, AddTorrentResponse, Session, SessionOptions,
};
const TIMEOUT_SECS: u64 = 180;
#[tokio::test(flavor = "multi_thread", worker_threads = 64)]
async fn test_e2e_download() {
tokio::time::timeout(Duration::from_secs(TIMEOUT_SECS), _test_e2e_download())
.await
.unwrap()
}
async fn _test_e2e_download() {
let _ = tracing_subscriber::fmt::try_init();
// 1. Create a torrent