mchades opened a new pull request, #10857:
URL: https://github.com/apache/gravitino/pull/10857
### What changes were proposed in this pull request?
This PR fixes flaky interference around function/fileset retention tests by
closing leaked test-side EntityStore lifecycles that start background
RelationalGarbageCollector threads.
Changes:
1. TestPolicyManager
- Promote local EntityStore in @BeforeAll to a class-level field.
- Close it in @AfterAll and set it to null.
2. AbstractEntityStorageTest (PostgreSQL init path)
- Wrap temporary RelationalEntityStore with try-with-resources so it is
always closed after manual cleanup.
### Why are the changes needed?
RelationalEntityStore.initialize() always starts RelationalGarbageCollector.
If test-created stores are not closed, leaked GC threads can outlive their test
class and mutate relational metadata in later tests, causing intermittent
failures (including #10700 symptoms).
Related CI failure example:
-
https://github.com/apache/gravitino/actions/runs/24782154942/job/72516171769
Fix: #10700
### Does this PR introduce _any_ user-facing change?
No. This change only affects test lifecycle management and does not change
production behavior or public APIs.
### How was this patch tested?
- ./gradlew :core:compileTestJava -PskipDockerTests=true
- ./gradlew :core:compileTestJava :core:test --tests
org.apache.gravitino.policy.TestPolicyManager -PskipDockerTests=true
Both commands completed successfully in the fix branch.
--
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]