diff options
Diffstat (limited to 'tests/failure_modes.rs')
| -rw-r--r-- | tests/failure_modes.rs | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/tests/failure_modes.rs b/tests/failure_modes.rs index bea00a2..74794b4 100644 --- a/tests/failure_modes.rs +++ b/tests/failure_modes.rs @@ -1,8 +1,3 @@ -//! The failure-mode tier: a `FakeBackend` decorator that breaks sandboxes on -//! purpose, so the recovery paths are executed rather than described. Every -//! scenario runs rootless, offline, against the real step machine โ the same -//! philosophy as the shims (ยง16a), one layer up. - mod common; use std::sync::Arc; @@ -106,9 +101,8 @@ 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 build - // fails its step, the lease expires, and a fresh worker resumes from the - // checkpoints with a healthy pool. + // 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"); @@ -120,8 +114,7 @@ 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, with a lease nobody will extend. + // 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", @@ -129,8 +122,7 @@ 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 - // and the build lands. + // 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 { .. } @@ -179,10 +171,9 @@ 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, not build against a world that is - // not the one the plan approved. + // 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 { .. })); |
