+BLOCKED, +UNBLOCKED, and +BLOCKING tags
These are somewhat expensive tags, as they require reference to values outside of the task itself. To accomplish this, the replica supplies a pre-computed DependencyMap that is only calculated once per replica, and only from the working set.
This commit is contained in:
@@ -406,9 +406,12 @@ mod test {
|
||||
let task = replica.get_task(uuids[0]).unwrap().unwrap();
|
||||
assert_eq!(
|
||||
task_column(&task, &column, &working_set),
|
||||
s!("+PENDING +bar +foo")
|
||||
s!("+PENDING +UNBLOCKED +bar +foo")
|
||||
);
|
||||
let task = replica.get_task(uuids[2]).unwrap().unwrap();
|
||||
assert_eq!(task_column(&task, &column, &working_set), s!("+PENDING"));
|
||||
assert_eq!(
|
||||
task_column(&task, &column, &working_set),
|
||||
s!("+PENDING +UNBLOCKED")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,13 @@ macro_rules! argv {
|
||||
// NOTE: in Rust 1.56.0, this can be changed to HashSet::from([..])
|
||||
#[cfg(test)]
|
||||
macro_rules! set(
|
||||
{ $($key:expr),+ } => {
|
||||
{ $($key:expr),* $(,)? } => {
|
||||
{
|
||||
#[allow(unused_mut)]
|
||||
let mut s = ::std::collections::HashSet::new();
|
||||
$(
|
||||
s.insert($key);
|
||||
)+
|
||||
)*
|
||||
s
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user