Tim Donohue created DS-1198:
-------------------------------

             Summary: Unit Testing Framework fails to initialize properly on 
Windows OS
                 Key: DS-1198
                 URL: https://jira.duraspace.org/browse/DS-1198
             Project: DSpace
          Issue Type: Bug
    Affects Versions: 3.0
         Environment: Windows OS
            Reporter: Tim Donohue
            Assignee: Tim Donohue
             Fix For: 3.0


With recent changes to the Unit Testing Framework (added after 1.8.x releases), 
the AbstractUnitTest class fails to initialize the testing environment on 
Windows OS.

The reason that the testing environment fails to initialize properly is because 
of the difference in file path separators (i.e. Windows uses backslashes as 
path separators, which we all know cause issues in Java Strings if not escaped 
properly).  

This problem comes into play in the dspace-api & dspace-stats POMs, as they 
both use the ${project.build.directory} maven property to initialize the 
"dspace.dir" in dspace.cfg, etc.  On Windows, unfortunately the 
${project.build.directory} has backslashes as path separators, which causes 
issues in initializing the DSpace test environment.

The end result is that you end up with FileNoteFoundExceptions when the test 
environment attempts to load anything in the "config" directory.

Although this isn't a major issue, it's obviously a problem for folks 
developing on Windows who want to also perform Unit Testing. Currently it's not 
possible to run any unit tests on Windows.

I've found a way to fix this issue in the Maven POMs & will submit a pull 
request for review shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.duraspace.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to