@@ -3798,6 +3798,7 @@ mod tests {
3798
3798
use crate :: message:: delete_msgs;
3799
3799
use crate :: receive_imf:: receive_imf;
3800
3800
use crate :: test_utils:: TestContext ;
3801
+ use crate :: tools;
3801
3802
use tokio:: fs;
3802
3803
3803
3804
#[ tokio:: test( flavor = "multi_thread" , worker_threads = 2 ) ]
@@ -4107,17 +4108,17 @@ mod tests {
4107
4108
4108
4109
add_contact_to_chat ( & alice, alice_chat_id, claire_id) . await ?;
4109
4110
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 ;
4111
4112
4112
4113
add_contact_to_chat ( & alice, alice_chat_id, daisy_id) . await ?;
4113
4114
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 ;
4115
4116
4116
4117
assert_eq ! ( get_chat_contacts( & alice, alice_chat_id) . await ?. len( ) , 4 ) ;
4117
4118
4118
4119
remove_contact_from_chat ( & alice, alice_chat_id, claire_id) . await ?;
4119
4120
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 ;
4121
4122
4122
4123
remove_contact_from_chat ( & alice, alice_chat_id, daisy_id) . await ?;
4123
4124
let remove2 = alice. pop_sent_msg ( ) . await ;
@@ -4154,11 +4155,11 @@ mod tests {
4154
4155
4155
4156
send_text_msg ( & alice, alice_chat_id, "populate" . to_string ( ) ) . await ?;
4156
4157
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 ;
4158
4159
4159
4160
remove_contact_from_chat ( & alice, alice_chat_id, claire_id) . await ?;
4160
4161
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 ;
4162
4163
4163
4164
remove_contact_from_chat ( & alice, alice_chat_id, daisy_id) . await ?;
4164
4165
let remove2 = alice. pop_sent_msg ( ) . await ;
@@ -4752,9 +4753,9 @@ mod tests {
4752
4753
. await
4753
4754
. unwrap ( )
4754
4755
. chat_id ;
4755
- tokio :: time :: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) . await ;
4756
+ tools :: sleep ( std:: time:: Duration :: from_millis ( 1000 ) ) . await ;
4756
4757
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 ;
4758
4759
let chat_id3 = create_group_chat ( & t, ProtectionStatus :: Unprotected , "foo" )
4759
4760
. await
4760
4761
. unwrap ( ) ;
0 commit comments