mchades opened a new issue, #10136:
URL: https://github.com/apache/gravitino/issues/10136

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   `TestFilesetMetaService` and `TestFunctionMetaService` contain the same 
brittle version count assertions that were fixed in `TestPolicyMetaService` by 
PR #10082 (issue #10006).
   
   After `hardDeleteLegacyData` (which iterates over all EntityTypes), these 
tests assert exact version row counts (e.g., `assertEquals(3, 
listXxxVersions(anotherXxx.id()).size())`). In PostgreSQL, the delete operation 
removes **all** version rows with `deleted_at > 0` regardless of entity ID, so 
the exact count can drop below the expected value under CI conditions.
   
   For a recent CI failure, see: 
https://github.com/apache/gravitino/actions/runs/22559519486/job/65343121418?pr=10087
   
   **Affected assertions:**
   
   **TestFilesetMetaService.java** (`testMetaLifeCycleFromCreationToDeletion`):
   - `assertEquals(3, listFilesetVersions(anotherFileset.id()).size())` after 
`hardDeleteLegacyData`
   - `assertEquals(3, versionDeletedMap.size())` after `deleteOldVersionData`
   - `assertEquals(2, versionDeletedMap.values().stream().filter(value -> value 
!= 0L).count())`
   - `assertEquals(1, listFilesetVersions(anotherFileset.id()).size())` after 
second `hardDeleteLegacyData`
   
   **TestFunctionMetaService.java** (`testMetaLifeCycleFromCreationToDeletion`):
   - `assertEquals(3, listFunctionVersions(anotherFunction.id()).size())` after 
`hardDeleteLegacyData`
   - `assertEquals(3, versionDeletedMap.size())` after `deleteOldVersionData`
   - `assertEquals(2, versionDeletedMap.values().stream().filter(value -> value 
!= 0L).count())`
   - `assertEquals(1, listFunctionVersions(anotherFunction.id()).size())` after 
second `hardDeleteLegacyData`
   
   ### Error message and/or stacktrace
   
   Same failure pattern as #10006 — `AssertionFailedError: expected: <3> but 
was: <1>` (or similar) under PostgreSQL backend in CI.
   
   ### How to reproduce
   
   Run `TestFilesetMetaService` or `TestFunctionMetaService` with PostgreSQL 
backend under CI load.
   
   ### Additional context
   
   Follow-up to #10006 and PR #10082 which only fixed `TestPolicyMetaService`.


-- 
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