20260624 优化ROA cache lookup长尾

This commit is contained in:
2026-06-24 09:50:23 +08:00
parent 8c4a677ffa
commit adb68fd469
3 changed files with 416 additions and 59 deletions

View File

@@ -313,6 +313,10 @@ fn roa_cache_projection_from_vcir_keeps_only_roa_vrp_outputs() {
projection.entries[0].source_object_uri,
"rsync://example.test/repo/object.roa"
);
assert_eq!(
projection.entries[0].outputs_effective_until_unix,
12 * 3600
);
assert_eq!(projection.entries[0].outputs.len(), 1);
assert!(matches!(
projection.entries[0].outputs[0].payload,
@@ -337,6 +341,10 @@ fn roa_cache_projection_groups_multiple_outputs_by_roa_uri() {
assert_eq!(projection.entries.len(), 1);
assert_eq!(projection.entries[0].outputs.len(), 2);
assert_eq!(
projection.entries[0].outputs_effective_until_unix,
12 * 3600
);
}
#[test]