96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 1 | use std::time::Duration; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 2 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 3 | use macltok::{ |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 4 | ClientHandle, Command, CommandErrorKind, CommandId, CommandKind, Engine, EngineConfig, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 5 | EngineError, Event, EventStream, LifecycleCommand, MessageContent, MessageEditContent, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 6 | RichText, RoomCommand, TimelineCommand, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 7 | }; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 8 | use matrix_sdk::{ |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 9 | ruma::{RoomId, api::client::sync::sync_events::v5, event_id, room_id}, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 10 | test_utils::mocks::MatrixMockServer, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 11 | }; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 12 | use tokio::task::JoinHandle; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 13 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 14 | #[tokio::test] |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 15 | async fn empty_message_bodies_report_their_command_ids() { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 16 | let room_id = room_id!("!empty-bodies:localhost"); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 17 | let (server, handle, mut events, running) = start_engine(room_id).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 18 | open_room(&handle, &mut events, room_id).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 19 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 20 | let commands = [ |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 21 | TimelineCommand::Send { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 22 | timeline_id: room_id.to_owned().into(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 23 | content: MessageContent::text(String::new()), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 24 | }, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 25 | TimelineCommand::Send { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 26 | timeline_id: room_id.to_owned().into(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 27 | content: MessageContent::emote(RichText::plain(" "), Default::default()), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 28 | }, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 29 | TimelineCommand::Send { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 30 | timeline_id: room_id.to_owned().into(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 31 | content: MessageContent::reply( |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 32 | event_id!("$reply:localhost").to_owned(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 33 | RichText::plain("\n"), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 34 | Default::default(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 35 | ), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 36 | }, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 37 | TimelineCommand::Edit { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 38 | timeline_id: room_id.to_owned().into(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 39 | event_id: event_id!("$edit:localhost").to_owned(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 40 | content: MessageEditContent::text("\t"), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 41 | }, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 42 | ]; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 43 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 44 | for command in commands { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 45 | let id = handle.send(Command::Timeline(command)).await.unwrap(); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 46 | let failure = receive_command_failure(&mut events, id).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 47 | assert_eq!(failure.id, id); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 48 | assert_eq!(failure.command, CommandKind::Timeline); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 49 | assert_eq!(failure.kind, CommandErrorKind::EmptyBody); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 50 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 51 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 52 | stop_engine(handle, &mut events, running).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 53 | drop(server); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 54 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 55 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 56 | #[tokio::test] |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 57 | async fn open_resets_the_timeline_before_succeeding() { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 58 | let room_id = room_id!("!open-order:localhost"); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 59 | let (server, handle, mut events, running) = start_engine(room_id).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 60 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 61 | open_room(&handle, &mut events, room_id).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 62 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 63 | stop_engine(handle, &mut events, running).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 64 | drop(server); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 65 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 66 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 67 | #[tokio::test] |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 68 | async fn same_room_sends_complete_in_submission_order() { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 69 | let room_id = room_id!("!send-order:localhost"); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 70 | let (server, handle, mut events, running) = start_engine(room_id).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 71 | open_room(&handle, &mut events, room_id).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 72 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 73 | let first_id = handle |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 74 | .send(Command::Timeline(TimelineCommand::Send { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 75 | timeline_id: room_id.to_owned().into(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 76 | content: MessageContent::text("first"), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 77 | })) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 78 | .await |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 79 | .unwrap(); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 80 | let second_id = handle |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 81 | .send(Command::Timeline(TimelineCommand::Send { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 82 | timeline_id: room_id.to_owned().into(), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 83 | content: MessageContent::text("second"), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 84 | })) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 85 | .await |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 86 | .unwrap(); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 87 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 88 | assert_eq!( |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 89 | receive_timeline_completion(&mut events, &[first_id, second_id]).await, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 90 | vec![first_id, second_id] |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 91 | ); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 92 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 93 | stop_engine(handle, &mut events, running).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 94 | drop(server); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 95 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 96 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 97 | async fn start_engine( |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 98 | room_id: &RoomId, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 99 | ) -> ( |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 100 | MatrixMockServer, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 101 | ClientHandle, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 102 | EventStream, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 103 | JoinHandle<Result<(), EngineError>>, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 104 | ) { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 105 | let server = MatrixMockServer::new().await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 106 | server |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 107 | .mock_sliding_sync() |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 108 | .ok(v5::Response::new("1".to_owned())) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 109 | .mount() |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 110 | .await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 111 | let client = server.client_builder().build().await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 112 | server.mock_room_state_encryption().plain().mount().await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 113 | server.sync_joined_room(&client, room_id).await; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 114 | let config = EngineConfig::default().with_initial_history_limit(0); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 115 | let (engine, handle, events) = Engine::from_client(client, config).await.unwrap(); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 116 | let running = tokio::spawn(engine.run()); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 117 | (server, handle, events, running) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 118 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 119 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 120 | async fn open_room(handle: &ClientHandle, events: &mut EventStream, room_id: &RoomId) -> CommandId { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 121 | let id = handle |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 122 | .send(Command::Room(RoomCommand::Open(room_id.to_owned()))) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 123 | .await |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 124 | .unwrap(); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 125 | let mut reset_received = false; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 126 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 127 | tokio::time::timeout(Duration::from_secs(2), async { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 128 | loop { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 129 | match events.recv().await.expect("event stream closed") { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 130 | Event::TimelineReset { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 131 | timeline_id: reset_timeline, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 132 | .. |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 133 | } if reset_timeline.room_id() == room_id => reset_received = true, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 134 | Event::CommandSucceeded { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 135 | id: succeeded_id, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 136 | command: CommandKind::Room, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 137 | } if succeeded_id == id => { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 138 | assert!(reset_received); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 139 | break; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 140 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 141 | Event::CommandFailed(failure) if failure.id == id => { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 142 | panic!("opening room failed {failure:?}") |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 143 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 144 | _ => {} |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 145 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 146 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 147 | }) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 148 | .await |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 149 | .expect("room did not open"); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 150 | id |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 151 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 152 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 153 | async fn receive_command_failure( |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 154 | events: &mut EventStream, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 155 | expected_id: CommandId, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 156 | ) -> macltok::CommandFailure { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 157 | tokio::time::timeout(Duration::from_secs(2), async { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 158 | loop { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 159 | match events.recv().await.expect("event stream closed") { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 160 | Event::CommandFailed(failure) if failure.id == expected_id => return failure, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 161 | Event::CommandSucceeded { id, .. } if id == expected_id => { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 162 | panic!("command unexpectedly succeeded") |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 163 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 164 | _ => {} |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 165 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 166 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 167 | }) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 168 | .await |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 169 | .expect("command failure did not arrive") |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 170 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 171 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 172 | async fn receive_timeline_completion( |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 173 | events: &mut EventStream, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 174 | expected_ids: &[CommandId], |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 175 | ) -> Vec<CommandId> { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 176 | tokio::time::timeout(Duration::from_secs(2), async { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 177 | let mut completed = Vec::new(); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 178 | while completed.len() < expected_ids.len() { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 179 | match events.recv().await.expect("event stream closed") { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 180 | Event::CommandSucceeded { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 181 | id, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 182 | command: CommandKind::Timeline, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 183 | } if expected_ids.contains(&id) => completed.push(id), |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 184 | Event::CommandFailed(failure) if expected_ids.contains(&failure.id) => { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 185 | panic!("timeline command failed {failure:?}") |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 186 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 187 | _ => {} |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 188 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 189 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 190 | completed |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 191 | }) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 192 | .await |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 193 | .expect("timeline commands did not complete") |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 194 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 195 | |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 196 | async fn stop_engine( |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 197 | handle: ClientHandle, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 198 | events: &mut EventStream, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 199 | running: JoinHandle<Result<(), EngineError>>, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 200 | ) { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 201 | let id = handle |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 202 | .send(Command::Lifecycle(LifecycleCommand::Shutdown)) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 203 | .await |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 204 | .unwrap(); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 205 | tokio::time::timeout(Duration::from_secs(2), async { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 206 | let mut succeeded = false; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 207 | while let Some(event) = events.recv().await { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 208 | match event { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 209 | Event::CommandSucceeded { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 210 | id: succeeded_id, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 211 | command: CommandKind::Lifecycle, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 212 | } if succeeded_id == id => succeeded = true, |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 213 | Event::Stopped => { |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 214 | assert!(succeeded); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 215 | break; |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 216 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 217 | _ => {} |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 218 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 219 | } |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 220 | }) |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 221 | .await |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 222 | .expect("engine did not stop"); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 223 | running.await.unwrap().unwrap(); |
96fdf90aacd6 | atagen | 2026-09-08 08:24 UTC | 224 | } |