20260410 完成五个rir 基于cir的三方回放,raw by hash 独立db,发现内存占用大,连续大rir 录制发生oom
This commit is contained in:
@@ -45,7 +45,6 @@ fn cli_run_offline_mode_executes_and_writes_json_and_ccr() {
|
||||
assert_eq!(v["format_version"], 2);
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn cli_run_offline_mode_writes_decodable_ccr() {
|
||||
let db_dir = tempfile::tempdir().expect("db tempdir");
|
||||
@@ -130,10 +129,11 @@ fn cli_run_offline_mode_writes_cir_and_static_pool() {
|
||||
let cir = rpki::cir::decode_cir(&bytes).expect("decode cir");
|
||||
assert_eq!(cir.tals.len(), 1);
|
||||
assert_eq!(cir.tals[0].tal_uri, "https://example.test/root.tal");
|
||||
assert!(cir
|
||||
.objects
|
||||
.iter()
|
||||
.any(|item| item.rsync_uri.contains("apnic-rpki-root-iana-origin.cer")));
|
||||
assert!(
|
||||
cir.objects
|
||||
.iter()
|
||||
.any(|item| item.rsync_uri.contains("apnic-rpki-root-iana-origin.cer"))
|
||||
);
|
||||
|
||||
let mut file_count = 0usize;
|
||||
let mut stack = vec![static_root.clone()];
|
||||
@@ -182,14 +182,18 @@ fn cli_run_blackbox_rsync_wrapper_mode_matches_reference_ccr_without_ta_path() {
|
||||
.expect("write ta into mirror");
|
||||
|
||||
let bin = env!("CARGO_BIN_EXE_rpki");
|
||||
let wrapper = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("scripts/cir/cir-rsync-wrapper");
|
||||
let wrapper =
|
||||
std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("scripts/cir/cir-rsync-wrapper");
|
||||
let reference = Command::new(bin)
|
||||
.env("REAL_RSYNC_BIN", real_rsync)
|
||||
.env("CIR_MIRROR_ROOT", &mirror_root)
|
||||
.args([
|
||||
"--db",
|
||||
db_dir.path().join("reference-db").to_string_lossy().as_ref(),
|
||||
db_dir
|
||||
.path()
|
||||
.join("reference-db")
|
||||
.to_string_lossy()
|
||||
.as_ref(),
|
||||
"--tal-path",
|
||||
tal_path.to_string_lossy().as_ref(),
|
||||
"--ta-path",
|
||||
@@ -208,7 +212,11 @@ fn cli_run_blackbox_rsync_wrapper_mode_matches_reference_ccr_without_ta_path() {
|
||||
])
|
||||
.output()
|
||||
.expect("run reference wrapper mode");
|
||||
assert!(reference.status.success(), "stderr={}", String::from_utf8_lossy(&reference.stderr));
|
||||
assert!(
|
||||
reference.status.success(),
|
||||
"stderr={}",
|
||||
String::from_utf8_lossy(&reference.stderr)
|
||||
);
|
||||
|
||||
let out = Command::new(bin)
|
||||
.env("REAL_RSYNC_BIN", real_rsync)
|
||||
@@ -232,7 +240,11 @@ fn cli_run_blackbox_rsync_wrapper_mode_matches_reference_ccr_without_ta_path() {
|
||||
])
|
||||
.output()
|
||||
.expect("run blackbox wrapper mode");
|
||||
assert!(out.status.success(), "stderr={}", String::from_utf8_lossy(&out.stderr));
|
||||
assert!(
|
||||
out.status.success(),
|
||||
"stderr={}",
|
||||
String::from_utf8_lossy(&out.stderr)
|
||||
);
|
||||
|
||||
let reference = rpki::ccr::decode_content_info(&std::fs::read(&ref_ccr_path).unwrap())
|
||||
.expect("decode reference ccr");
|
||||
|
||||
Reference in New Issue
Block a user