Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-255

Test in Runtime TestSupport component fails due to TimeZone

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • core-1.0.0
    • core-1.0.0
    • Core
    • Win 7, Jdk 1.7, IST TimeZone

    Description

      Error in the build of the testsupport component as follows:

      loadInstance(org.apache.isis.runtimes.dflt.runtime.fixturedomainservice.ObjectFixtureFilePersistorTest): expected:<Mon Mar 08 06:30:00 IST 2010> but was:<Mon Mar 08 01:00:00 IST 2010>

      This is because my Time Zone is IST. If I set my Time Zone to GMT then the test passes

      The error comes at this line in the class ObjectFixtureFilePersistorTest and method loadInstance():

      Assert.assertEquals(dateFormat.parse("08-Mar-2010 01:00 GMT"), epv.getDate());

      Here the epv.getData() returns date in IST and the code getting executed is from the SimpleEntity getDate() method

      Attachments

        1. ObjectFixtureFilePersistorTest.patch
          1.0 kB
          Mukul Joshi
        2. ObjectFixtureFilePersistorTest.java
          8 kB
          Mukul Joshi

        Activity

          People

            danhaywood Daniel Keir Haywood
            mukuljoshi Mukul Joshi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: