yuqi1129 opened a new pull request, #12146: URL: https://github.com/apache/gravitino/pull/12146
### What changes were proposed in this pull request? Wait for the embedded Gravitino server task to terminate completely in `MiniGravitino.stop()` instead of treating an unavailable HTTP port as completion. Also serialize `GravitinoEnv` initialization and shutdown so an unfinished shutdown cannot close components belonging to a newly initialized server. ### Why are the changes needed? Embedded integration tests repeatedly start and stop Gravitino servers in the same JVM. The HTTP port can close before `GravitinoEnv.shutdown()` finishes, allowing the next server to initialize the singleton environment concurrently. The old shutdown can then close the new server's `CatalogManager`, leaving its `ClassLoaderPool` permanently closed and causing catalog creation to fail with: `IllegalStateException: ClassLoaderPool is already closed` Fix: #12145 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - `./gradlew :core:test --tests org.apache.gravitino.catalog.TestClassLoaderPoolIntegration :integration-test-common:compileTestJava -PskipITs` - `./gradlew :clients:client-java:test --tests org.apache.gravitino.client.integration.test.MetalakeIT -PskipDockerTests=true` - `./gradlew :core:spotlessApply :integration-test-common:spotlessApply` - `git diff --check` -- 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]
