File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -914,7 +914,7 @@ mod tests {
914914 sleep ( Duration :: from_millis ( 25 ) ) . await ;
915915 }
916916 } ;
917- timeout ( Duration :: from_secs ( 2 ) , wait) . await . is_ok ( )
917+ timeout ( Duration :: from_secs ( 5 ) , wait) . await . is_ok ( )
918918 }
919919
920920 #[ tokio:: test]
@@ -1601,6 +1601,26 @@ mod tests {
16011601 . get_thread ( child_thread_id)
16021602 . await
16031603 . expect ( "child thread should exist" ) ;
1604+ let mut status_rx = harness
1605+ . control
1606+ . subscribe_status ( child_thread_id)
1607+ . await
1608+ . expect ( "status subscription should succeed" ) ;
1609+ if matches ! ( status_rx. borrow( ) . clone( ) , AgentStatus :: PendingInit ) {
1610+ timeout ( Duration :: from_secs ( 5 ) , async {
1611+ loop {
1612+ status_rx
1613+ . changed ( )
1614+ . await
1615+ . expect ( "child status should advance past pending init" ) ;
1616+ if !matches ! ( status_rx. borrow( ) . clone( ) , AgentStatus :: PendingInit ) {
1617+ break ;
1618+ }
1619+ }
1620+ } )
1621+ . await
1622+ . expect ( "child should initialize before shutdown" ) ;
1623+ }
16041624 let _ = child_thread
16051625 . submit ( Op :: Shutdown { } )
16061626 . await
You can’t perform that action at this time.
0 commit comments