Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2501

Elasticsearch calendar resolution handling is not consistent with Lucene's

    Details

      Description

      I've noticed this test failing before when working in the evening, and then suddenly working fine again after midnight.

      Failed tests: 
        NumericEncodingQueriesTest.testDslWithCalendar:96 expected:<Fair [id=1, name=Lucca comics and games, startDate=Fri Dec 31 23:55:19 GMT 1965, since=java.util.GregorianCalendar[time=-126230680591,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Rome",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=169,lastRule=java.util.SimpleTimeZone[id=Europe/Rome,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=1966,MONTH=0,WEEK_OF_YEAR=52,WEEK_OF_MONTH=0,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=7,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=55,SECOND=19,MILLISECOND=409,ZONE_OFFSET=3600000,DST_OFFSET=0]]> but was:<null>
      
      Tests run: 1002, Failures: 1, Errors: 0, Skipped: 13
      
      

      I suspect the reason relates with the used TimeZone. I'm in London, while the test explicitly picks the timezone "Europe/Rome". So in Rome it's next day already...

        Attachments

          Activity

            People

            • Assignee:
              yrodiere Yoann Rodière
              Reporter:
              sanne Sanne Grinovero
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: