mchades opened a new issue, #10700: URL: https://github.com/apache/gravitino/issues/10700
### Version main branch ### Describe what's wrong `TestFunctionMetaService.testDeleteFunctionVersionsByRetentionCount()` and `TestFilesetMetaService.testDeleteFilesetVersionsByRetentionCount()` still rely on aggregate count assertions after version retention cleanup. This makes intermittent CI failures low-signal: when the assertion fails, it only shows that the number of active/deleted versions is different from expected, but it does not show which specific version state is wrong or whether the inconsistency already existed before retention cleanup started. These tests should verify the semantic version states directly: - all expected versions are active before retention cleanup - the expected old versions are soft deleted after cleanup - the expected latest versions remain active ### Error message and/or stacktrace Recent CI failure source: https://github.com/apache/gravitino/actions/runs/23938045194/job/69818305958#step:7:2041 Example failure: ``` TestFunctionMetaService > testDeleteFunctionVersionsByRetentionCount() > [POSTGRESQL Backend] FAILED org.opentest4j.AssertionFailedError: expected: <2> but was: <1> at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:628) at app//org.apache.gravitino.storage.relational.service.TestFunctionMetaService.testDeleteFunctionVersionsByRetentionCount(TestFunctionMetaService.java:410) ``` ### How to reproduce 1. Run the relational storage tests with the PostgreSQL backend enabled in CI. 2. Observe `TestFunctionMetaService.testDeleteFunctionVersionsByRetentionCount()` or `TestFilesetMetaService.testDeleteFilesetVersionsByRetentionCount()` when the version-state counts do not match the assertion. 3. The current assertions only validate aggregate counts, so the failure does not identify which version was unexpectedly active or deleted. ### Additional context This is similar in spirit to earlier brittle test fixes such as #10082 and #10137, but for the retention-count tests specifically. The proposed fix is test-only: - add pre-cleanup active-state checks - assert concrete version states after retention cleanup - do not modify product logic -- 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]
