From d255a0a57530fa36210ded4b50d247f732b6e2bd Mon Sep 17 00:00:00 2001 From: LongYinan Date: Mon, 20 Mar 2023 11:59:53 +0800 Subject: [PATCH] chore: decrease timeout in tsfn test --- examples/napi/src/threadsafe_function.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/napi/src/threadsafe_function.rs b/examples/napi/src/threadsafe_function.rs index 41a692b7..f4adcf50 100644 --- a/examples/napi/src/threadsafe_function.rs +++ b/examples/napi/src/threadsafe_function.rs @@ -138,6 +138,7 @@ pub async fn tsfn_return_promise_timeout(func: ThreadsafeFunction) -> Resul use tokio::time::{self, Duration}; let promise = func.call_async::>(Ok(1)).await?; let sleep = time::sleep(Duration::from_millis(100)); + let sleep = time::sleep(Duration::from_nanos(1)); tokio::select! { _ = sleep => { return Err(Error::new(Status::GenericFailure, "Timeout".to_owned()));