Uploaded image for project: 'OODT'
  1. OODT
  2. OODT-174

TestAcquisitionDateVersioner fails in the later evening

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.2
    • Fix Version/s: 0.3
    • Component/s: file manager
    • Labels:
      None
    • Environment:

      none

      Description

      -------------------------------------------------------------------------------
      Test set: org.apache.oodt.cas.filemgr.versioning.TestAcquisitionDateVersioner
      -------------------------------------------------------------------------------
      Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.453 sec <<< FAILURE!
      testVersionerWithNoStartDateTimeAndNoAcqDate(org.apache.oodt.cas.filemgr.versioning.TestAcquisitionDateVersioner) Time elapsed: 0.425 sec <<< FAILURE!
      junit.framework.ComparisonFailure: expected:<...le:/home/files/11041[1]/file1.txt> but was:<...le:/home/files/11041[2]/file1.txt>
      at junit.framework.Assert.assertEquals(Assert.java:81)
      at junit.framework.Assert.assertEquals(Assert.java:87)
      at org.apache.oodt.cas.filemgr.versioning.TestAcquisitionDateVersioner.testVersionerWithNoStartDateTimeAndNoAcqDate(TestAcquisitionDateVersioner.java:70)

      The problem is that TestAcquisitionDateVersioner doesn't set timezone in its unit-test as it does in versioner:
      acqDateFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));

      – Side NOTE . . . also notice this when looking into the problem . . .
      also it doesn't use CAS.ProductReceivedTime as documented:
      (line 79) // grab CAS.ProductReceivedTime
      instead it just uses date now:
      (line 85) Date casProdReceivedTime = new Date();

        Attachments

        1. OODT-174.2011-04-12.patch.txt
          1 kB
          Brian Foster

          Activity

            People

            • Assignee:
              chrismattmann Chris A. Mattmann
              Reporter:
              bfoster Brian Foster
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: