mchades opened a new pull request, #10137:
URL: https://github.com/apache/gravitino/pull/10137

   ## What changes were proposed in this pull request?
   
   Replaced fragile `assertEquals(N, listXxxVersions(...).size())` assertions 
in `TestFilesetMetaService` and `TestFunctionMetaService` with semantic checks 
that verify the semantically important invariants instead of exact row counts.
   
   This is a follow-up to PR #10082 which applied the same fix to 
`TestPolicyMetaService`.
   
   ## Why are the changes needed?
   
   Same reason as #10082: after `hardDeleteLegacyData` (which iterates over all 
EntityTypes), these tests assert exact version row counts. In PostgreSQL, 
`deleteXxxVersionsByLegacyTimeline` deletes **all** version rows with 
`deleted_at > 0` that are older than the legacy timeline — it does **not** 
filter by entity ID. This makes exact count assertions fragile under CI 
conditions.
   
   For a recent CI failure, see: 
https://github.com/apache/gravitino/actions/runs/22559519486/job/65343121418?pr=10087
   
   The semantically important invariant is that the **latest version (v3) 
remains active** (`deleted_at == 0`), not that all 3 rows still physically 
exist. Similarly after `deleteOldVersionData`, what matters is that v3 is 
active and exactly 1 row remains with `deleted_at == 0`.
   
   ## Does this PR introduce any user-facing changes?
   
   No. This is a test-only change.
   
   Fixes #10136


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to