fix(test): concurrency issue in compaction tests (#6615)

fix/compaction-concurrency:
 Add delay before compaction in `compaction_test.rs`

 - Introduced a 2-millisecond delay using `tokio::time::sleep` before the `compact` function call in `test_compaction_region_with_overlapping_delete_all` to ensure proper timing and synchronization during the test execution.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
This commit is contained in:
Lei, HUANG
2025-07-30 19:24:56 +08:00
committed by GitHub
parent 2b4fb2f32a
commit a265499325

View File

@@ -485,7 +485,7 @@ async fn test_compaction_region_with_overlapping_delete_all() {
put_and_flush(&engine, region_id, &column_schemas, 0..2400).await; // window 3600
put_and_flush(&engine, region_id, &column_schemas, 0..3600).await; // window 3600
delete_and_flush(&engine, region_id, &column_schemas, 0..10800).await; // window 10800
tokio::time::sleep(Duration::from_millis(2)).await;
compact(&engine, region_id).await;
let scanner = engine
.scanner(region_id, ScanRequest::default())