Skip to content

Commit

Permalink
fix: unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
v0y4g3r committed Apr 26, 2024
1 parent 37d8001 commit b4e29b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mito2/src/engine/append_mode_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async fn test_append_mode_compaction() {
+-------+---------+---------------------+";
// Scans in parallel.
let scanner = engine.scanner(region_id, ScanRequest::default()).unwrap();
assert_eq!(1, scanner.num_files());
assert_eq!(2, scanner.num_files());
assert_eq!(1, scanner.num_memtables());
let stream = scanner.scan().await.unwrap();
let batches = RecordBatches::try_collect(stream).await.unwrap();
Expand Down
9 changes: 7 additions & 2 deletions src/mito2/src/engine/compaction_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,13 @@ async fn test_compaction_region() {
assert_eq!(result.affected_rows, 0);

let scanner = engine.scanner(region_id, ScanRequest::default()).unwrap();
// [0..9]
// [10...19]
// [20....29]
// -[15.........29]-
// [15.....24]
assert_eq!(
1,
3,
scanner.num_files(),
"unexpected files: {:?}",
scanner.file_ids()
Expand Down Expand Up @@ -280,7 +285,7 @@ async fn test_readonly_during_compaction() {
.unwrap();
// Flush 2 SSTs for compaction.
put_and_flush(&engine, region_id, &column_schemas, 0..10).await;
put_and_flush(&engine, region_id, &column_schemas, 10..20).await;
put_and_flush(&engine, region_id, &column_schemas, 5..20).await;

// Waits until the engine receives compaction finished request.
listener.wait_handle_finished().await;
Expand Down
2 changes: 1 addition & 1 deletion src/mito2/src/region/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl TwcsOptions {
impl Default for TwcsOptions {
fn default() -> Self {
Self {
max_active_window_runs: 4,
max_active_window_runs: 1,
max_inactive_window_files: 1,
time_window: None,
}
Expand Down

0 comments on commit b4e29b9

Please sign in to comment.