The JavaTest TestDescription.getSourceFiles returns non-normalized source path. This may cause an issue for compiler tests that are running concurrently and shares same sources, when the sources are located outside the test directory or sub-directory.
For example, the JCK test descriptions below have a relative path reference to '../examples/Wombat.java':
api/java_beans/BeanDescriptor/descriptions.html
api/java_beans/DefaultPersistenceDelegate/index.html
... 6 more ...
The JavaTest simple creates the path to the source file as concatenation of the test directory path and the test source path with path normalization. Technically it means the one Wombat.java source file has different path depending on the test directory:
api/java_beans/BeanDescriptor/../examples/Wombat.java
api/java_beans/DefaultPersistenceDelegate/../examples/Wombat.java
The JavaTest considers the paths above as references to different classes and will not prevent parallel compilation for the Wombat class in the Script class.
It would be good to consider possibility of source path normalization in the Test Description before synchronizing compilation.
Note this issues has been fixed in JCK 7. See 6989900.
Verified on JCK6b because JCK7 and JCK8 contains their own fixes.
For example, the JCK test descriptions below have a relative path reference to '../examples/Wombat.java':
api/java_beans/BeanDescriptor/descriptions.html
api/java_beans/DefaultPersistenceDelegate/index.html
... 6 more ...
The JavaTest simple creates the path to the source file as concatenation of the test directory path and the test source path with path normalization. Technically it means the one Wombat.java source file has different path depending on the test directory:
api/java_beans/BeanDescriptor/../examples/Wombat.java
api/java_beans/DefaultPersistenceDelegate/../examples/Wombat.java
The JavaTest considers the paths above as references to different classes and will not prevent parallel compilation for the Wombat class in the Script class.
It would be good to consider possibility of source path normalization in the Test Description before synchronizing compilation.
Note this issues has been fixed in JCK 7. See 6989900.
Verified on JCK6b because JCK7 and JCK8 contains their own fixes.