You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by Ross Laidlaw <rl...@gmail.com> on 2014/08/04 07:59:45 UTC

Review Request 24224: OODT-729: Fix file manager unit tests in the 'util' package

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24224/
-----------------------------------------------------------

Review request for oodt, Lewis McGibbney, Chris Mattmann, Paul Ramirez, and Rishi Verma.


Bugs: OODT-729
    https://issues.apache.org/jira/browse/OODT-729


Repository: oodt


Description
-------

Fixes tests in the 'util' package for the file manager.  There are three test classes in the package: TestGenericFileManagerObjectStructFactory, TestXmlRpcStructFactory and TestXmlStructFactory.  TestXmlStructFactory is unaffected by this patch.

Changes were made to TestGenericFileManagerObjectStructFactory and TestXmlRpcStructFactory as detailed on OODT-729 and as shown in the diff.  Essentially, test resources were retrieved using the getResource method and URLs rather than hard-coded paths, and a Properties object was used to reset System properties in the tearDown methods so that properties wouldn't persist between unit tests.


Diffs
-----

  /trunk/filemgr/src/test/java/org/apache/oodt/cas/filemgr/util/TestGenericFileManagerObjectStructFactory.java 1615477 
  /trunk/filemgr/src/test/java/org/apache/oodt/cas/filemgr/util/TestXmlRpcStructFactory.java 1615477 

Diff: https://reviews.apache.org/r/24224/diff/


Testing
-------

The commands used to run the tests were as follows:


At top level (trunk directory):

  mvn clean -Dtest=TestGenericFileManagerObjectStructFactory -DfailIfNoTests=false test -pl filemgr -am

  mvn clean -Dtest=TestXmlRpcStructFactory -DfailIfNoTests=false test -pl filemgr -am


At module level (filemgr directory):

  mvn clean -Dtest=TestGenericFileManagerObjectStructFactory test

  mvn clean -Dtest=TestXmlRpcStructFactory test
 


Test Results Before Changes (running from top level):


  TestGenericFileManagerObjectStructFactory Results :

    Failed tests: 
      testGetDataTransferServiceFromFactory(org.apache.oodt.cas.filemgr.util.TestGenericFileManagerObjectStructFactory): ./src/main/resources/filemgr.properties (No such file or directory)
      testGetRepositoryManagerServiceFromFactory(org.apache.oodt.cas.filemgr.util.TestGenericFileManagerObjectStructFactory): ./src/main/resources/filemgr.properties (No such file or directory)
      testGetCatalogServiceFromFactory(org.apache.oodt.cas.filemgr.util.TestGenericFileManagerObjectStructFactory): ./src/main/resources/filemgr.properties (No such file or directory)
      testGetValidationLayerFromFactory(org.apache.oodt.cas.filemgr.util.TestGenericFileManagerObjectStructFactory): ./src/main/resources/filemgr.properties (No such file or directory)
      testGetVersionerFromClassName(org.apache.oodt.cas.filemgr.util.TestGenericFileManagerObjectStructFactory): ./src/main/resources/filemgr.properties (No such file or directory)
      testGetExtractorFromClassName(org.apache.oodt.cas.filemgr.util.TestGenericFileManagerObjectStructFactory): ./src/main/resources/filemgr.properties (No such file or directory)

    Tests run: 6, Failures: 6, Errors: 0, Skipped: 0


  TestXmlRpcStructFactory Results :

    Failed tests: 
      testProductTypeMethods(org.apache.oodt.cas.filemgr.util.TestXmlRpcStructFactory): ./src/main/resources/filemgr.properties (No such file or directory)
      testProductMethods(org.apache.oodt.cas.filemgr.util.TestXmlRpcStructFactory): ./src/main/resources/filemgr.properties (No such file or directory)

    Tests run: 2, Failures: 2, Errors: 0, Skipped: 0


Test Results After Changes:

  TestGenericFileManagerObjectStructFactory Results :
    Tests run: 6, Failures: 0, Errors: 0, Skipped: 0

  TestXmlRpcStructFactory Results :
    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0


Thanks,

Ross Laidlaw