11use std:: path:: PathBuf ;
2+ use std:: { thread, time} ;
23
34use crate :: support:: events_helpers:: { assert_events, match_end, match_error, match_start} ;
45use crate :: support:: sandbox:: sandbox;
@@ -143,6 +144,7 @@ fn redirects_download() {
143144 . with_stderr_contains( "[..]/hook/default/node/1.2.3" )
144145 ) ;
145146
147+ thread:: sleep ( time:: Duration :: from_millis ( 5000 ) ) ;
146148 assert_events (
147149 & s,
148150 vec ! [
@@ -172,6 +174,7 @@ fn merges_project_and_default_hooks() {
172174 . with_stderr_contains
( "[..]Could not download [email protected] " ) 173175 . with_stderr_contains( "[..]/hook/project/yarn/3.2.1" )
174176 ) ;
177+ thread:: sleep ( time:: Duration :: from_millis ( 5000 ) ) ;
175178 assert_events (
176179 & s,
177180 vec ! [
@@ -190,6 +193,7 @@ fn merges_project_and_default_hooks() {
190193 . with_stderr_contains
( "[..]Could not download [email protected] " ) 191194 . with_stderr_contains( "[..]/hook/default/node/10.12.1" )
192195 ) ;
196+ thread:: sleep ( time:: Duration :: from_millis ( 5000 ) ) ;
193197 assert_events (
194198 & s,
195199 vec ! [
@@ -226,6 +230,7 @@ fn merges_workspace_hooks() {
226230 . with_stderr_contains
( "[..]Could not download [email protected] " ) 227231 . with_stderr_contains( "[..]/hook/project/yarn/3.1.4" )
228232 ) ;
233+ thread:: sleep ( time:: Duration :: from_millis ( 5000 ) ) ;
229234 assert_events (
230235 & s,
231236 vec ! [
@@ -244,6 +249,7 @@ fn merges_workspace_hooks() {
244249 . with_stderr_contains
( "[..]Could not download [email protected] " ) 245250 . with_stderr_contains( "[..]/hook/workspace/npm/5.6.7" )
246251 ) ;
252+ thread:: sleep ( time:: Duration :: from_millis ( 5000 ) ) ;
247253 assert_events (
248254 & s,
249255 vec ! [
0 commit comments