Skip to content

Commit

Permalink
fix(test): fix meta backup test (#14567)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwang28 authored and Little-Wallace committed Jan 20, 2024
1 parent 2562b4e commit d785518
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/meta/src/backup_restore/meta_snapshot_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl<S: MetaStore> MetaSnapshotV1Builder<S> {
.await?
.into_iter()
.next()
.ok_or_else(|| anyhow!("hummock version stats not found in meta store"))?;
.unwrap_or_else(HummockVersionStats::default);
let compaction_groups =
crate::hummock::model::CompactionGroup::list_at_snapshot::<S>(&meta_store_snapshot)
.await?
Expand Down Expand Up @@ -193,16 +193,6 @@ mod tests {
let v_ = v.clone();
async move { v_ }
};
let err = builder
.build(1, get_ckpt_builder(&hummock_version))
.await
.unwrap_err();
let err = assert_matches!(err, BackupError::Other(e) => e);
assert_eq!(
"hummock version stats not found in meta store",
err.to_string()
);

let hummock_version_stats = HummockVersionStats {
hummock_version_id: hummock_version.id,
..Default::default()
Expand Down

0 comments on commit d785518

Please sign in to comment.