My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 3: Tests fail on case-sensitive file system + system dependent directory separator
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  nikla...@gmail.com
Closed:  Dec 2013


 
Reported by the0xF...@gmail.com, Nov 28, 2013
What steps will reproduce the problem?
1.Use case-sensitive file system
2.Try to build jar with maven

What is the expected output? What do you see instead?
All tests fail on a case-sensitive file system
with a file-not-found exception

What version of the product are you using? On what operating system?
Current version. An Ubuntu based distro.

Please provide any additional information below.
Solution:
The default file system is case-sensitive, in the code all all files have a lowercase extension (.dds), some of the test files have an uppercase extension. (.DDS)

(in src/test/resources/net/nikr/dds/)
For example ATI1N.DDS should be ATI1N.dds

Rename all .DDS files to .dds to solve this issue

The only other problem are the system-specific directory separators.
Windows uses a backslash, the rest a forward slash.
Use the constant "File.separator" for directory separators to avoid this problem:

in DDSImageReaderTest.java
...
private class TestParams{
  private final String pathSeparator = File.separator;
  private final String dir = "src" + pathSeparator + "test" + pathSeparator + "resources" + pathSeparator + "net" + pathSeparator + "nikr" + pathSeparator + "dds" + pathSeparator;
...

After those corrections the project compiled
Nov 28, 2013
#1 the0xF...@gmail.com
* After those corrections the test cases ran through
Nov 29, 2013
Project Member #2 nikla...@gmail.com
Thank you for your bug reports.

Completed in r20

If you could validate that it works now and reply here, that would be very much appreciated.
Owner: nikla...@gmail.com
Nov 29, 2013
Project Member #3 nikla...@gmail.com
Fixed some more File.separator in r21 (that should be all of them)
Dec 1, 2013
#4 the0xF...@gmail.com
Tests are running through
Dec 2, 2013
Project Member #5 nikla...@gmail.com
(No comment was entered for this change.)
Status: Fixed

Powered by Google Project Hosting