Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7
    • 0.7
    • file manager
    • Don't Know (Unsure) - The default level

    Description

      This step fixes unit tests for the file manager's 'validation' package. This package has a single test class TestXMLValidationLayer and the changes are trivial (a couple of lines in the setUp() method):

      Before:

        protected void setUp() throws Exception {
          ...
          for (File f : new File("./src/testdata/vallayer")
            ...
        }
      

      After:

      import java.net.URL;
      ...
        protected void setUp() throws Exception {
          ...
            URL url = this.getClass().getResource("/vallayer");
            for (File f : new File(url.getFile())
            ...
        }
      

      This is a straightforward fix as there are no System.setProperty() calls in this test class.

      Test results before applying the patch:

      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer
      Tests run: 7, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.038 sec <<< FAILURE!
      
      Results :
      
      Tests in error: 
        testModifyElement(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
        testGetElements(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
        testReadProperDescriptionTrimImplicitTrue(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
        testReadBadFormattedDescriptionTrimImplicitTrue(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
        testReadDescriptionTrimExplicitFalse(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
        testReadDescriptionTrimExplicitTrue(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
        testGetElementsForProductType(org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer)
      
      Tests run: 7, Failures: 0, Errors: 7, Skipped: 0
      

      Test results after applying the patch:

      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running org.apache.oodt.cas.filemgr.validation.TestXMLValidationLayer
      Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.234 sec
      
      Results :
      
      Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
      

      The following command runs the test from the top level directory:

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

      The following command runs the test within the filemgr subdirectory:

      mvn clean -Dtest=TestXMLValidationLayer test
      

      Attachments

        Activity

          People

            rlaidlaw Ross Laidlaw
            rlaidlaw Ross Laidlaw
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment