summaryrefslogtreecommitdiffstats
path: root/tests/pipeline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pipeline.rs')
-rw-r--r--tests/pipeline.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/pipeline.rs b/tests/pipeline.rs
index 1ad1dfd..5a2fa5a 100644
--- a/tests/pipeline.rs
+++ b/tests/pipeline.rs
@@ -307,18 +307,18 @@ fn an_unresolvable_dependency_blocks_instead_of_failing() {
}
#[test]
-fn publishing_a_dependency_requeues_what_it_unblocks() {
+fn a_blocked_build_waits_until_its_dependency_actually_arrives() {
let (env, _fx) = env_with_fixture("missing-dep");
env.subscribe("dep-partner");
let c = approve_fixture(&env, "missing-dep");
assert!(matches!(run_for(&env, &c), pipeline::Outcome::Blocked { .. }));
assert_eq!(builds::blocked_builds(&env.db).unwrap().len(), 1);
- // Something lands in the index: blocked builds get another look (§10.4).
- let n = publish::reconcile(&env.cfg, &env.db).unwrap_or(0);
- let _ = n;
- let requeued = builds::requeue_blocked(&env.db).unwrap();
- assert_eq!(requeued, 1);
- assert_eq!(builds::blocked_builds(&env.db).unwrap().len(), 0);
+ // The dispatcher sweeps blocked builds every pass. Requeueing one whose
+ // blocker is still missing would block again immediately — a busy loop that
+ // burns a claim and a plan step each tick — so it must stay put.
+ let _ = publish::reconcile(&env.cfg, &env.db);
+ assert_eq!(builds::requeue_blocked(&env.db).unwrap(), 0, "requeued while still blocked");
+ assert_eq!(builds::blocked_builds(&env.db).unwrap().len(), 1);
}
#[test]