litiliu opened a new issue, #3437: URL: https://github.com/apache/fluss/issues/3437
### Describe the bug `ComponentClassLoaderTest.testOwnerFirstResourceFoundIgnoresComponent` can fail in CI when `java.io.tmpdir` points to a path that contains dots, for example a temporary directory containing a version-like segment such as `1.0-SNAPSHOT`. In this case `ComponentClassLoader#getResource(...)` returns `null`, and the test fails because the loaded resource is expected to be the owner class loader resource. ### Reproduction Run the `fluss-common` test module with a temp directory whose path contains dots, for example: ```bash mvn -pl fluss-common -Dtest=ComponentClassLoaderTest -Djava.io.tmpdir=/tmp/fluss-1.0-SNAPSHOT test ``` ### Root cause The test uses the `@TempDir` absolute path as both the resource name and the owner-first package/resource prefix. `ComponentClassLoader` converts package prefixes to resource path prefixes by replacing `.` with `/`. If the temp path contains a segment such as `1.0-SNAPSHOT`, it is converted to `1/0-SNAPSHOT`, so the owner-first resource prefix no longer matches the actual resource name. As a result, the owner-first resource lookup is skipped and `getResource(...)` returns `null`. ### Expected behavior The test should not depend on the formatting of the machine-specific temporary directory path. It should use a stable package/resource prefix and create an explicit test resource under the temp directory. ### Affected test `fluss-common/src/test/java/org/apache/fluss/classloading/ComponentClassLoaderTest.java` -- 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]
