@@ -3798,6 +3798,7 @@ mod tests {
37983798 use crate :: message:: delete_msgs;
37993799 use crate :: receive_imf:: receive_imf;
38003800 use crate :: test_utils:: TestContext ;
3801+ use crate :: tools;
38013802 use tokio:: fs;
38023803
38033804 #[ tokio:: test( flavor = "multi_thread" , worker_threads = 2 ) ]
@@ -4107,17 +4108,17 @@ mod tests {
41074108
41084109 add_contact_to_chat ( & alice, alice_chat_id, claire_id) . await ?;
41094110 let add2 = alice. pop_sent_msg ( ) . await ;
4110- tokio :: time :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
4111+ tools :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
41114112
41124113 add_contact_to_chat ( & alice, alice_chat_id, daisy_id) . await ?;
41134114 let add3 = alice. pop_sent_msg ( ) . await ;
4114- tokio :: time :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
4115+ tools :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
41154116
41164117 assert_eq ! ( get_chat_contacts( & alice, alice_chat_id) . await ?. len( ) , 4 ) ;
41174118
41184119 remove_contact_from_chat ( & alice, alice_chat_id, claire_id) . await ?;
41194120 let remove1 = alice. pop_sent_msg ( ) . await ;
4120- tokio :: time :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
4121+ tools :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
41214122
41224123 remove_contact_from_chat ( & alice, alice_chat_id, daisy_id) . await ?;
41234124 let remove2 = alice. pop_sent_msg ( ) . await ;
@@ -4154,11 +4155,11 @@ mod tests {
41544155
41554156 send_text_msg ( & alice, alice_chat_id, "populate" . to_string ( ) ) . await ?;
41564157 let add = alice. pop_sent_msg ( ) . await ;
4157- tokio :: time :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
4158+ tools :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
41584159
41594160 remove_contact_from_chat ( & alice, alice_chat_id, claire_id) . await ?;
41604161 let remove1 = alice. pop_sent_msg ( ) . await ;
4161- tokio :: time :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
4162+ tools :: sleep ( std:: time:: Duration :: from_millis ( 1100 ) ) . await ;
41624163
41634164 remove_contact_from_chat ( & alice, alice_chat_id, daisy_id) . await ?;
41644165 let remove2 = alice. pop_sent_msg ( ) . await ;
@@ -4752,9 +4753,9 @@ mod tests {
47524753 . await
47534754 . unwrap ( )
47544755 . chat_id ;
4755- tokio :: time :: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) . await ;
4756+ tools :: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) . await ;
47564757 let chat_id2 = t. get_self_chat ( ) . await . id ;
4757- tokio :: time :: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) . await ;
4758+ tools :: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) . await ;
47584759 let chat_id3 = create_group_chat ( & t, ProtectionStatus :: Unprotected , "foo" )
47594760 . await
47604761 . unwrap ( ) ;
0 commit comments