Fix num_tasks == 1 assertion
This commit is contained in:
parent
a72c6a6224
commit
e371522a80
2 changed files with 5 additions and 5 deletions
|
|
@ -23,7 +23,7 @@ use crate::{
|
|||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 64)]
|
||||
async fn test_e2e_download() {
|
||||
wait_until_i_am_the_last_task().await.unwrap();
|
||||
let dbg_srv = spawn_debug_server();
|
||||
|
||||
let timeout = std::env::var("E2E_TIMEOUT")
|
||||
.ok()
|
||||
|
|
@ -39,6 +39,8 @@ async fn test_e2e_download() {
|
|||
.context("test_e2e_download timed out")
|
||||
.unwrap();
|
||||
|
||||
dbg_srv.abort();
|
||||
|
||||
// Wait to ensure everything is dropped.
|
||||
wait_until_i_am_the_last_task().await.unwrap();
|
||||
|
||||
|
|
@ -52,8 +54,6 @@ async fn _test_e2e_download(drop_checks: &DropChecks) {
|
|||
Err(e) => error!(error=?e, "error increasing ulimit"),
|
||||
};
|
||||
|
||||
spawn_debug_server();
|
||||
|
||||
// 1. Create a torrent
|
||||
// Ideally (for a more complicated test) with N files, and at least N pieces that span 2 files.
|
||||
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ async fn debug_server() -> anyhow::Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn spawn_debug_server() {
|
||||
tokio::spawn(debug_server());
|
||||
pub fn spawn_debug_server() -> tokio::task::JoinHandle<anyhow::Result<()>> {
|
||||
tokio::spawn(debug_server())
|
||||
}
|
||||
|
||||
pub trait DropPlaceholder: Send + Sync {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue