From b6d51d3b4ae8ddcb1e4a53854fb74f171ddc9310 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 19 Jun 2024 15:20:22 +0200 Subject: [PATCH] remove test https://github.com/neondatabase/neon/pull/7777#discussion_r1602986080 --- pageserver/compaction/src/identify_levels.rs | 43 -------------------- 1 file changed, 43 deletions(-) diff --git a/pageserver/compaction/src/identify_levels.rs b/pageserver/compaction/src/identify_levels.rs index d56ec87ed0..e93b3ad920 100644 --- a/pageserver/compaction/src/identify_levels.rs +++ b/pageserver/compaction/src/identify_levels.rs @@ -348,49 +348,6 @@ mod tests { Ok(()) } - #[tokio::test] - async fn test_disjoint_key_ranges_same_lsn() -> anyhow::Result<()> { - tracing_subscriber::fmt::init(); // so that RUST_LOG=trace works - - // `identify_levels` sorts by end_lsn only, so, this `vec![]` is already sorted. - // (The sort implementation may shuffle the elements anyway, but, let's assume it doesn't.) - let max_size = 0x2000; - let layers = vec![ - delta(0x1000..0x2000, Lsn(0x8000)..Lsn(0x9000)), // A - delta(0x2000..0x3000, Lsn(0x5000)..Lsn(0x9000)), // B 2 x max_size - delta(0x3000..0x4000, Lsn(0x8000)..Lsn(0x9000)), // C - ]; - - // The layers are processed in order A, B, C - // - // A B C - // 10000 - // - // 9000 + + + - // | | | - // 8000 + | + - // 7000 | - // 6000 | - // 5000 + - // 4000 - // - // current_best_start_lsn: 10000 9000 - // current_best_layers: [] [] - // candidate_start_lsn: 10000 8000 - // candidate_layers: [] [A] - // - // A: Hooray, there are no crossing LSNs. - // B: Too large. Discard 'candidate' and return with 'current_best' - // - - let level = identify_level(layers.clone(), Lsn(0x10_000), max_size) - .await? - .unwrap(); - assert_eq!(level.lsn_range, Lsn(0x9_000)..Lsn(0x10_000)); - assert_eq!(level.layers.len(), 0); - Ok(()) - } - #[tokio::test] async fn test_overlapping_lsn_ranges() -> anyhow::Result<()> { // The files LSN ranges overlap, so even though there are more files that