refactor(#2591): make NodeKind the queue payload — drop JobPayload, agent into variants
This commit is contained in:
parent
2294cd4516
commit
be2dfa8cd3
8 changed files with 233 additions and 177 deletions
|
|
@ -109,8 +109,9 @@ fn cyclic_dag_is_rejected_at_submit() {
|
|||
// 0 → 1 → 0 cycle.
|
||||
spec.nodes = vec![
|
||||
NodeSpec {
|
||||
agent: "agent-a".to_owned(),
|
||||
kind: NodeKind::StopForUpdate,
|
||||
kind: NodeKind::StopForUpdate {
|
||||
agent: "agent-a".to_owned(),
|
||||
},
|
||||
deps: vec![Dep {
|
||||
on: 1,
|
||||
when: DepWhen::AfterOk,
|
||||
|
|
@ -118,8 +119,9 @@ fn cyclic_dag_is_rejected_at_submit() {
|
|||
parent: None,
|
||||
},
|
||||
NodeSpec {
|
||||
agent: "agent-a".to_owned(),
|
||||
kind: NodeKind::Reconcile,
|
||||
kind: NodeKind::Reconcile {
|
||||
agent: "agent-a".to_owned(),
|
||||
},
|
||||
deps: vec![Dep {
|
||||
on: 0,
|
||||
when: DepWhen::AfterOk,
|
||||
|
|
@ -136,8 +138,9 @@ fn unknown_dep_is_rejected_at_submit() {
|
|||
let q = JobQueue::new(1);
|
||||
let mut spec = rebuild("agent-a", "bad dep");
|
||||
spec.nodes = vec![NodeSpec {
|
||||
agent: "agent-a".to_owned(),
|
||||
kind: NodeKind::Reconcile,
|
||||
kind: NodeKind::Reconcile {
|
||||
agent: "agent-a".to_owned(),
|
||||
},
|
||||
deps: vec![Dep {
|
||||
on: 9,
|
||||
when: DepWhen::AfterOk,
|
||||
|
|
@ -154,8 +157,9 @@ fn invalid_parent_is_rejected_at_submit() {
|
|||
// A forward/out-of-bounds parent index must be refused at validate, not
|
||||
// panic in `insert_group`.
|
||||
spec.nodes = vec![NodeSpec {
|
||||
agent: "agent-a".to_owned(),
|
||||
kind: NodeKind::Reconcile,
|
||||
kind: NodeKind::Reconcile {
|
||||
agent: "agent-a".to_owned(),
|
||||
},
|
||||
deps: Vec::new(),
|
||||
parent: Some(3),
|
||||
}];
|
||||
|
|
@ -560,7 +564,6 @@ fn append_subgraph_roots_on_emitter_and_rebases_local_deps() {
|
|||
perm_payload: None,
|
||||
transient: None,
|
||||
nodes: vec![NodeSpec {
|
||||
agent: "hyperhive".to_owned(),
|
||||
kind: NodeKind::MetaLock {
|
||||
sweep: true,
|
||||
fanout: None,
|
||||
|
|
|
|||
Loading…
Reference in a new issue