Skip to content

Commit af24cac

Browse files
committed
test(e2e): accept asynchronous stopped sandbox deletion
Allow either completed or accepted deletion output, then continue polling for actual sandbox absence. This preserves the lifecycle assertion under the phase-two deletion contract. Refs #3051. Signed-off-by: Mrunal Patel <[email protected]>
1 parent ec34487 commit af24cac

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎e2e/rust/tests/sandbox_lifecycle.rs‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,15 @@ async fn sandbox_can_be_deleted_while_stopped() {
302302
);
303303

304304
let delete_output = run_sandbox_lifecycle_command("delete", &sandbox.name).await;
305+
// Deletion may return before the owned cleanup worker finishes. Both
306+
// outcomes must still reach absence, which is checked below.
305307
assert!(
306-
delete_output.contains("Deleted sandbox"),
307-
"expected delete confirmation in:\n{delete_output}",
308+
delete_output.contains(&format!("Deleted sandbox {}", sandbox.name))
309+
|| delete_output.contains(&format!(
310+
"Sandbox {} deletion accepted; cleanup is pending",
311+
sandbox.name
312+
)),
313+
"expected completed or accepted deletion in:\n{delete_output}",
308314
);
309315

310316
if let Err(last_sandbox_list) = assert_sandbox_presence_eventually(&sandbox.name, false).await {

0 commit comments

Comments
 (0)