Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
Li0k committed Aug 23, 2024
1 parent 097ad1c commit 8c7c47f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/meta/src/hummock/manager/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ fn gen_sstable_info(sst_id: u64, idx: usize, table_ids: Vec<u32>) -> SstableInfo
object_id: sst_id,
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
}
}
Expand Down Expand Up @@ -1322,6 +1324,8 @@ async fn test_split_compaction_group_on_commit() {
table_ids: vec![100, 101],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand Down Expand Up @@ -1414,6 +1418,8 @@ async fn test_split_compaction_group_on_demand_basic() {
table_ids: vec![100],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand All @@ -1430,6 +1436,8 @@ async fn test_split_compaction_group_on_demand_basic() {
table_ids: vec![100, 101],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand Down Expand Up @@ -1508,6 +1516,8 @@ async fn test_split_compaction_group_on_demand_non_trivial() {
table_ids: vec![100, 101],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand Down Expand Up @@ -1597,6 +1607,8 @@ async fn test_split_compaction_group_trivial_expired() {
table_ids: vec![100],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand All @@ -1613,6 +1625,8 @@ async fn test_split_compaction_group_trivial_expired() {
right: iterator_test_key_of_epoch(101, 100, 20).into(),
right_exclusive: false,
},
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand Down Expand Up @@ -1704,6 +1718,8 @@ async fn test_split_compaction_group_trivial_expired() {
table_ids: vec![100],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
}],
None,
Expand Down Expand Up @@ -1763,6 +1779,8 @@ async fn test_split_compaction_group_on_demand_bottom_levels() {
table_ids: vec![100, 101],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand Down Expand Up @@ -1791,6 +1809,8 @@ async fn test_split_compaction_group_on_demand_bottom_levels() {
right: iterator_test_key_of_epoch(1, 1, 1).into(),
right_exclusive: false,
},
file_size: 100,
sst_size: 100,
..Default::default()
},
SstableInfo {
Expand All @@ -1802,6 +1822,8 @@ async fn test_split_compaction_group_on_demand_bottom_levels() {
right: iterator_test_key_of_epoch(1, 2, 2).into(),
right_exclusive: false,
},
file_size: 100,
sst_size: 100,
..Default::default()
},
],
Expand Down Expand Up @@ -1896,6 +1918,8 @@ async fn test_compaction_task_expiration_due_to_split_group() {
table_ids: vec![100, 101],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand All @@ -1912,6 +1936,8 @@ async fn test_compaction_task_expiration_due_to_split_group() {
table_ids: vec![101],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand Down Expand Up @@ -2279,6 +2305,8 @@ async fn test_unregister_moved_table() {
table_ids: vec![100],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand All @@ -2295,6 +2323,8 @@ async fn test_unregister_moved_table() {
table_ids: vec![100, 101],
min_epoch: 20,
max_epoch: 20,
file_size: 100,
sst_size: 100,
..Default::default()
},
table_stats: Default::default(),
Expand Down
10 changes: 10 additions & 0 deletions src/storage/hummock_test/src/hummock_storage_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2530,6 +2530,8 @@ async fn test_commit_multi_epoch() {
sst_id: 11,
object_id: 1,
table_ids: vec![existing_table_id.table_id],
file_size: 100,
sst_size: 100,
..Default::default()
};

Expand Down Expand Up @@ -2578,6 +2580,8 @@ async fn test_commit_multi_epoch() {
sst_id: 22,
object_id: 2,
table_ids: vec![existing_table_id.table_id],
file_size: 100,
sst_size: 100,
..Default::default()
};

Expand Down Expand Up @@ -2629,6 +2633,8 @@ async fn test_commit_multi_epoch() {
sst_id: 33,
object_id: 3,
table_ids: vec![new_table_id.table_id],
file_size: 100,
sst_size: 100,
..Default::default()
};

Expand Down Expand Up @@ -2671,6 +2677,8 @@ async fn test_commit_multi_epoch() {
sst_id: 44,
object_id: 4,
table_ids: vec![new_table_id.table_id],
file_size: 100,
sst_size: 100,
..Default::default()
};

Expand Down Expand Up @@ -2711,6 +2719,8 @@ async fn test_commit_multi_epoch() {
sst_id: 55,
object_id: 5,
table_ids: vec![existing_table_id.table_id, new_table_id.table_id],
file_size: 100,
sst_size: 100,
..Default::default()
};

Expand Down

0 comments on commit 8c7c47f

Please sign in to comment.