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

TestAcquisitionDateVersioner fails in the later evening

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.2
    • 0.3
    • file manager
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: