Skip to content

[test] Fix ComponentClassLoaderTest tmpdir path handling#3450

Merged
luoyuxia merged 1 commit into
apache:mainfrom
litiliu:codex/fix-component-classloader-tmpdir
Jun 9, 2026
Merged

[test] Fix ComponentClassLoaderTest tmpdir path handling#3450
luoyuxia merged 1 commit into
apache:mainfrom
litiliu:codex/fix-component-classloader-tmpdir

Conversation

@litiliu

@litiliu litiliu commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use a stable package/resource prefix in ComponentClassLoaderTest instead of the machine-specific temporary directory path.
  • Create the test resource explicitly under the JUnit temp directory.
  • Avoid failures when java.io.tmpdir contains dotted path segments such as 1.0-SNAPSHOT.

Root Cause

ComponentClassLoader converts package prefixes to resource path prefixes by replacing . with /. The test previously used the absolute @TempDir path as the prefix, so dotted path segments were rewritten and no longer matched the resource name.

Fixes #3437.

Test Plan

  • mvn -pl fluss-common -Dtest=ComponentClassLoaderTest test
  • mvn -pl fluss-common test

AI-assisted changes - reviewed by human developer

@litiliu litiliu marked this pull request as ready for review June 8, 2026 06:43

@luoyuxia luoyuxia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@litiliu Thanks. +1

@luoyuxia luoyuxia merged commit bd1bff3 into apache:main Jun 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UT] ComponentClassLoaderTest fails when java.io.tmpdir contains dots

2 participants