Fix Java test path duplication when tests_root includes package path#1282
Merged
HeshamHM28 merged 1 commit intoomni-javafrom Feb 3, 2026
Merged
Fix Java test path duplication when tests_root includes package path#1282HeshamHM28 merged 1 commit intoomni-javafrom
HeshamHM28 merged 1 commit intoomni-javafrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Java test path duplication when tests_root includes package path
Problem
When running Java optimization with a tests_root that already includes the Java package path (e.g.,
test/src/com/aerospike/test), generated test files were being written to incorrect duplicated paths:
Duplicated path structure: test/src/com/aerospike/test/com/aerospike/client/util/...
This caused:
Root Cause
In _fix_java_test_paths(), the code used self.test_cfg.tests_root directly and appended the package path from the
generated test source. When tests_root already contained the package structure (test/src/com/aerospike/test),
appending the test's package (com.aerospike.client.util) created a duplicated path.
Solution
Added _get_java_sources_root() method that:
Result
Before: test/src/com/aerospike/test/com/aerospike/client/util/UnpackerTest__perfinstrumented.java
After: test/src/com/aerospike/client/util/UnpackerTest__perfinstrumented.java