@@ -89,7 +89,9 @@ pub mod repair_test {
8989 client:: ClientAction ,
9090 downstairs:: DownstairsAction ,
9191 upstairs:: {
92- test:: { create_test_upstairs, start_up_and_repair} ,
92+ test:: {
93+ create_test_upstairs, start_up_and_repair, to_live_repair_ready,
94+ } ,
9395 Upstairs , UpstairsAction ,
9496 } ,
9597 } ;
@@ -1108,26 +1110,9 @@ pub mod repair_test {
11081110 assert_eq ! ( up. downstairs. last_repair_extent( ) , None ) ;
11091111 assert ! ( up. downstairs. repair( ) . is_none( ) ) ;
11101112
1111- // Start the LiveRepair, manually walking through states
1112- let client = ClientId :: new ( 1 ) ;
1113- up. downstairs . fault_client (
1114- client,
1115- & up. state ,
1116- ClientFaultReason :: RequestedFault ,
1117- ) ;
1118- let mode = ConnectionMode :: Faulted ;
1119- for state in [
1120- NegotiationStateData :: Start ,
1121- NegotiationStateData :: WaitForPromote ,
1122- NegotiationStateData :: WaitForRegionInfo ,
1123- NegotiationStateData :: GetExtentVersions ,
1124- NegotiationStateData :: LiveRepairReady ,
1125- ] {
1126- up. downstairs . clients [ client] . checked_state_transition (
1127- & up. state ,
1128- DsStateData :: Connecting { state, mode } ,
1129- ) ;
1130- }
1113+ // Fault and start live-repair for client 1
1114+ to_live_repair_ready ( & mut up, ClientId :: new ( 1 ) ) ;
1115+
11311116 up. check_live_repair_start ( ) ;
11321117 assert ! ( up. downstairs. live_repair_in_progress( ) ) ;
11331118 assert_eq ! ( up. downstairs. last_repair_extent( ) , Some ( ExtentId ( 0 ) ) ) ;
0 commit comments