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

        Chris Male created issue -
        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.
        Chris Male made changes -
        Field Original Value New Value
        Attachment SOLR-1821.patch [ 12438772 ]
        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.
        Robert Muir made changes -
        Assignee Robert Muir [ rcmuir ]
        Hide
        Robert Muir added a comment -

        Committed revision 922991.

        Thanks Chris!

        Show
        Robert Muir added a comment - Committed revision 922991. Thanks Chris!
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.5 [ 12313566 ]
        Resolution Fixed [ 1 ]
        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
        Hoss Man made changes -
        Fix Version/s 3.1 [ 12314371 ]
        Fix Version/s 4.0 [ 12314992 ]
        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
        Grant Ingersoll made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        32m 53s 1 Robert Muir 14/Mar/10 22:51
        Resolved Resolved Closed Closed
        380d 16h 54m 1 Grant Ingersoll 30/Mar/11 16:45

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development