test(optimize): assert the reconcile is metadata-only (fragments_removed)

The doc-comment promises fragments_added == fragments_removed == 0 for the
metadata-only reconcile; the test only checked fragments_added. Assert
fragments_removed == 0 too so the invariant is machine-checked.
This commit is contained in:
Ragnor Comerford 2026-06-08 16:07:23 +02:00
parent e8a7836a6e
commit fc77c9bb6d
No known key found for this signature in database

View file

@ -312,6 +312,10 @@ async fn optimize_reconciles_preexisting_manifest_head_drift() {
person.fragments_added, 0,
"drift reconcile is metadata-only — no new compaction",
);
assert_eq!(
person.fragments_removed, 0,
"drift reconcile is metadata-only — no fragments rewritten",
);
// Manifest now tracks the Lance HEAD.
let snap = db.snapshot_of(ReadTarget::branch("main")).await.unwrap();