chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
Compaction's base test leaves its young pack room to stay young
crates/knotless/tests/library.rs+4−2
| @@ -926,7 +926,9 @@ fn compaction_keeps_young_packs_and_drops_dead_refs() { | ||
#[test] | ||
fn compaction_keeps_the_bases_young_packs_name() { | ||
let mut s = Sandbox::new(); | ||
s.set("KNOTLESS_COMPACT_GRACE_SECS", "2"); | ||
// Wide enough that the last push stays young through the delete and | ||
// compaction after it, on a runner as busy as CI's. | ||
s.set("KNOTLESS_COMPACT_GRACE_SECS", "8"); | ||
let rt = rt(); | ||
let url = s.url("based"); | ||
rt.block_on(async { | ||
| @@ -945,7 +947,7 @@ fn compaction_keeps_the_bases_young_packs_name() { | ||
.sha; | ||
// Those two age past the grace; the next push, which names the | ||
// topic's tip as a base, does not. | ||
tokio::time::sleep(std::time::Duration::from_secs(3)).await; | ||
tokio::time::sleep(std::time::Duration::from_secs(9)).await; | ||
let main = knotless::commit::commit(&ctx, &r.url, &spec(vec![put("a", "2")], 0)) | ||
.await | ||
.unwrap() | ||