@@ -37,11 +37,13 @@ fn kill_tree_default() {
37
37
. spawn ( )
38
38
. unwrap ( ) ;
39
39
let target_process_id = child. id ( ) ;
40
+ thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
40
41
tx. send ( target_process_id) . unwrap ( ) ;
41
42
let _ = child. wait ( ) ;
42
43
} ) ;
43
44
let target_process_id = rx. recv ( ) . unwrap ( ) ;
44
45
let outputs = kill_tree:: blocking:: kill_tree ( target_process_id) . expect ( "Failed to kill" ) ;
46
+ println ! ( "{:?}" , outputs) ;
45
47
assert_eq ! ( outputs. len( ) , 1 ) ;
46
48
let output = & outputs[ 0 ] ;
47
49
match output {
@@ -73,6 +75,7 @@ fn kill_tree_with_config_sigkill() {
73
75
. spawn ( )
74
76
. unwrap ( ) ;
75
77
let target_process_id = child. id ( ) ;
78
+ thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
76
79
tx. send ( target_process_id) . unwrap ( ) ;
77
80
let _ = child. wait ( ) ;
78
81
} ) ;
@@ -83,6 +86,7 @@ fn kill_tree_with_config_sigkill() {
83
86
} ;
84
87
let outputs = kill_tree:: blocking:: kill_tree_with_config ( target_process_id, & config)
85
88
. expect ( "Failed to kill" ) ;
89
+ println ! ( "{:?}" , outputs) ;
86
90
assert_eq ! ( outputs. len( ) , 1 ) ;
87
91
let output = & outputs[ 0 ] ;
88
92
match output {
@@ -112,8 +116,8 @@ fn kill_tree_with_config_include_target_false() {
112
116
. arg ( get_node_script_spawn_infinite_child ( ) )
113
117
. spawn ( )
114
118
. unwrap ( ) ;
115
- thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
116
119
let target_process_id = child. id ( ) ;
120
+ thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
117
121
tx. send ( target_process_id) . unwrap ( ) ;
118
122
let _ = child. wait ( ) ;
119
123
} ) ;
@@ -124,6 +128,7 @@ fn kill_tree_with_config_include_target_false() {
124
128
} ;
125
129
let outputs = kill_tree:: blocking:: kill_tree_with_config ( target_process_id, & config)
126
130
. expect ( "Failed to kill" ) ;
131
+ println ! ( "{:?}" , outputs) ;
127
132
assert ! ( !outputs. is_empty( ) ) ;
128
133
let output = & outputs[ 0 ] ;
129
134
match output {
@@ -141,6 +146,7 @@ fn kill_tree_with_config_include_target_false() {
141
146
}
142
147
thread:: sleep ( Duration :: from_secs ( 1 ) ) ;
143
148
let outputs = kill_tree:: blocking:: kill_tree ( target_process_id) . expect ( "Failed to kill" ) ;
149
+ println ! ( "{:?}" , outputs) ;
144
150
assert_eq ! ( outputs. len( ) , 1 ) ;
145
151
let output = & outputs[ 0 ] ;
146
152
match output {
0 commit comments