From 202b8bb3ead1226f14df1021f556f12f45c80dab Mon Sep 17 00:00:00 2001 From: Dmitrii Bannov <104833606+yellowhatter@users.noreply.github.com> Date: Fri, 15 Dec 2023 12:00:58 +0300 Subject: [PATCH] Tests: use blocking executor for non-async code (#627) --- io/zenoh-transport/src/common/pipeline.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/zenoh-transport/src/common/pipeline.rs b/io/zenoh-transport/src/common/pipeline.rs index 2e3af61d64..954c656280 100644 --- a/io/zenoh-transport/src/common/pipeline.rs +++ b/io/zenoh-transport/src/common/pipeline.rs @@ -855,7 +855,7 @@ mod tests { }); let c_ps = *ps; - let t_s = task::spawn(async move { + let t_s = task::spawn_blocking(move || { schedule(producer, num_msg, c_ps); }); @@ -972,7 +972,7 @@ mod tests { let size = Arc::new(AtomicUsize::new(0)); let c_size = size.clone(); - task::spawn(async move { + task::spawn_blocking(move || { loop { let payload_sizes: [usize; 16] = [ 8, 16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096, 8_192, 16_384, 32_768,