test: add more allowed outcomes

I cannot see a quick fix to make one them winner, nor a reason why it
should be done; at worst case there could be double accounting for some
evicted layer should the two do it at the same time.
This commit is contained in:
Joonas Koivunen
2023-08-22 11:34:22 +03:00
parent fa0b881c4c
commit 04ab9b78fe

View File

@@ -4291,7 +4291,13 @@ mod tests {
.expect("should now have a reason to download");
match (first, second) {
(Ok(()), Err(EvictionError::NotFound)) | (Err(EvictionError::NotFound), Ok(())) => {}
(Ok(()), Ok(())) => {
// because there are no more timeline locks being taken on eviction path, we can
// witness all three outcomes here.
}
(Ok(()), Err(EvictionError::NotFound)) | (Err(EvictionError::NotFound), Ok(())) => {
// if one completes before the other, this is fine just as well.
}
other => unreachable!("unexpected {:?}", other),
}
}