summaryrefslogtreecommitdiffstats
path: root/tests/failure_modes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/failure_modes.rs')
-rw-r--r--tests/failure_modes.rs14
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/failure_modes.rs b/tests/failure_modes.rs
index 74794b4..e9083a2 100644
--- a/tests/failure_modes.rs
+++ b/tests/failure_modes.rs
@@ -11,15 +11,9 @@ use common::*;
#[derive(Clone, Copy, PartialEq, Eq)]
enum Fault {
- /// The sandbox vanishes while the build command is running — the shape of
- /// a VM pulled out from under a worker.
DieMidRun,
- /// The sandbox's own TTL bites mid-build.
TtlMidBuild,
- /// The pool is at quota: no lease exists to hand out.
NoCapacity,
- /// The sandbox installs the lease but its `pacman -Q` comes back empty —
- /// an incomplete closure, or a world that lied.
EmptyWorld,
}
@@ -101,8 +95,6 @@ fn run_with_fault(env: &Env, id: &str, fault: Fault) -> pipeline::Outcome {
#[test]
fn a_sandbox_that_dies_mid_run_expires_its_lease_and_the_requeue_finishes_the_build() {
- // I5 across the sandbox boundary: the box vanishes mid-build, the lease
- // expires, and a fresh worker resumes from the checkpoints.
let (env, _fx) = env_with_fixture("plain-make");
let id = approve_and_enqueue(&env, "plain-make");
@@ -114,7 +106,6 @@ fn a_sandbox_that_dies_mid_run_expires_its_lease_and_the_requeue_finishes_the_bu
other => panic!("{other:?}"),
}
- // The crash shape the dispatcher reaper knows: leased to a worker that is gone.
env.exec(
"UPDATE build SET state='leased', lease_owner='dead-worker',
lease_expires_at='2000-01-01T00:00:00Z' WHERE id=?1",
@@ -122,7 +113,6 @@ fn a_sandbox_that_dies_mid_run_expires_its_lease_and_the_requeue_finishes_the_bu
);
assert_eq!(builds::reap_expired(&env.db).unwrap(), 1);
- // Requeue and resume on a healthy pool: the completed steps do not re-run.
assert!(matches!(
pipeline::run(&env.cfg, &env.db, &id).unwrap(),
pipeline::Outcome::Succeeded { .. }
@@ -142,7 +132,6 @@ fn a_ttl_that_bites_mid_build_is_a_failed_step_not_a_lost_build() {
}
other => panic!("{other:?}"),
}
- // Nothing was published, and the approval is still there to resume from.
assert!(db::accepted_release(&env.db, "plain-make").unwrap().is_none());
}
@@ -171,9 +160,6 @@ fn a_full_pool_blocks_the_build_instead_of_breaking_it() {
#[test]
fn an_incomplete_closure_fails_closed_as_a_world_mismatch() {
- // dep-client's lease pins plain-make; the fake sandbox installs it but its
- // `pacman -Q` comes back empty — the world lied. Provisioning must refuse with
- // its own error class.
let (env, _plain, _client) = env_with_two_fixtures("plain-make", "dep-client");
let id = approve_and_enqueue(&env, "plain-make");
assert!(matches!(pipeline::run(&env.cfg, &env.db, &id).unwrap(), pipeline::Outcome::Succeeded { .. }));