Solr
  1. Solr
  2. SOLR-1821

Failing testGetDateFormatEvaluator in TestEvaluatorBag

    Details

      Description

      On some TimeZones (such as EDT currently), TestEvaluatorBag.testGetDateFormatEvaluator fails with the following error:

      org.junit.ComparisonFailure: 
      Expected :2010-03-12 17:15
      Actual   :2010-03-12 18:15
      	at org.junit.Assert.assertEquals(Assert.java:96)
      	at org.junit.Assert.assertEquals(Assert.java:116)
      	at org.apache.solr.handler.dataimport.TestEvaluatorBag.testGetDateFormatEvaluator(TestEvaluatorBag.java:127)
      

      This seems due to the reliance on the System ticks in order to create the Date to compare against.

        Activity

        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1.0 release

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1.0 release
        Hide
        Hoss Man added a comment -

        Correcting Fix Version based on CHANGES.txt, see this thread for more details...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Show
        Hoss Man added a comment - Correcting Fix Version based on CHANGES.txt, see this thread for more details... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E
        Hide
        Robert Muir added a comment -

        Committed revision 922991.

        Thanks Chris!

        Show
        Robert Muir added a comment - Committed revision 922991. Thanks Chris!
        Hide
        Robert Muir added a comment -

        Nice, fixes the issue.

        Can you commit this? It would help us in our current work to ensure we are not breaking tests.

        Show
        Robert Muir added a comment - Nice, fixes the issue. Can you commit this? It would help us in our current work to ensure we are not breaking tests.
        Hide
        Chris Male added a comment -

        Attaching a patch to the test which uses GregorianCalendar instances rather than the current System ticks.

        Show
        Chris Male added a comment - Attaching a patch to the test which uses GregorianCalendar instances rather than the current System ticks.

          People

          • Assignee:
            Robert Muir
            Reporter:
            Chris Male
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development