From 31c23a24ac9b0e275711c7165ccbcd67b3e7c9a6 Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Tue, 2 Mar 2021 13:13:52 +1100 Subject: [PATCH] use tokio::time::sleep instead of std::thread::sleep --- monero-harness/tests/wallet.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monero-harness/tests/wallet.rs b/monero-harness/tests/wallet.rs index 14ff5b93..a571a35e 100644 --- a/monero-harness/tests/wallet.rs +++ b/monero-harness/tests/wallet.rs @@ -1,8 +1,9 @@ use crate::testutils::init_tracing; use monero_harness::{Monero, MoneroWalletRpc}; use spectral::prelude::*; -use std::{thread::sleep, time::Duration}; +use std::time::Duration; use testcontainers::clients::Cli; +use tokio::time::sleep; mod testutils; @@ -67,6 +68,6 @@ async fn wait_for_wallet_to_catch_up(wallet: &MoneroWalletRpc, expected_balance: if balance == expected_balance || max_retry == retry { break; } - sleep(Duration::from_secs(1)); + sleep(Duration::from_secs(1)).await; } }