@@ -33,6 +33,12 @@ use tempfile::TempDir;
3333use tokio:: time:: sleep;
3434use ulid:: Ulid ;
3535
36+ // Realm-node and manifest convergence poll to a condition; the ceilings only
37+ // bound a genuine hang, so they carry generous headroom for a loaded CI runner
38+ // where anti-entropy across the holders is thread-starved and slow.
39+ const SETUP_TIMEOUT : Duration = Duration :: from_secs ( 120 ) ;
40+ const CONVERGENCE_TIMEOUT : Duration = Duration :: from_secs ( 180 ) ;
41+
3642struct TestNode {
3743 _temp_dir : TempDir ,
3844 net : NetHandle ,
@@ -101,7 +107,7 @@ async fn interleaved_writes_to_one_shard_converge_on_both_holders()
101107 )
102108 . await ?;
103109
104- let deadline = Instant :: now ( ) + Duration :: from_secs ( 30 ) ;
110+ let deadline = Instant :: now ( ) + CONVERGENCE_TIMEOUT ;
105111 loop {
106112 let left = assemble_shard_manifest ( nodes[ 0 ] . context . as_ref ( ) , realm_id, placement) . await ?;
107113 let right = assemble_shard_manifest ( nodes[ 1 ] . context . as_ref ( ) , realm_id, placement) . await ?;
@@ -221,7 +227,7 @@ async fn wait_for_manifest_agreement(
221227 placement : PlacementRef ,
222228 expected : usize ,
223229) -> Result < ( ) , Box < dyn std:: error:: Error > > {
224- let deadline = Instant :: now ( ) + Duration :: from_secs ( 30 ) ;
230+ let deadline = Instant :: now ( ) + CONVERGENCE_TIMEOUT ;
225231 loop {
226232 let left_manifest =
227233 assemble_shard_manifest ( left. context . as_ref ( ) , realm_id, placement) . await ?;
@@ -370,7 +376,7 @@ async fn wait_for_realm_node_convergence(
370376) -> Result < ( ) , Box < dyn std:: error:: Error > > {
371377 let expected: std:: collections:: HashSet < NodeId > =
372378 nodes. iter ( ) . map ( |node| node. net . node_id ( ) ) . collect ( ) ;
373- let deadline = Instant :: now ( ) + Duration :: from_secs ( 30 ) ;
379+ let deadline = Instant :: now ( ) + SETUP_TIMEOUT ;
374380 loop {
375381 let mut converged = true ;
376382 for node in nodes {
0 commit comments