Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 43450 invoked from network); 12 Oct 2004 07:01:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Oct 2004 07:01:42 -0000 Received: (qmail 44030 invoked by uid 500); 12 Oct 2004 07:01:08 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 43842 invoked by uid 500); 12 Oct 2004 07:01:06 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 43745 invoked by uid 99); 12 Oct 2004 07:01:05 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [195.209.41.194] (HELO tut.by) (195.209.41.194) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 12 Oct 2004 00:01:01 -0700 Received: from [82.209.244.108] (account anatol_osf HELO [192.168.1.67]) by tut.by (CommuniGate Pro SMTP 4.1.8) with ESMTP id 16002747 for lucene-dev@jakarta.apache.org; Tue, 12 Oct 2004 09:57:01 +0300 Date: Tue, 12 Oct 2004 09:58:41 +0300 From: Anatol Pomozov X-Mailer: The Bat! (v3.0.1 RC4) UNREG / CD5BF9353B3B7091 Reply-To: Anatol Pomozov Organization: Scand X-Priority: 3 (Normal) Message-ID: <1333747554.20041012095841@tut.by> To: "Lucene Developers List" Subject: Re[2]: DateTools tests failed In-Reply-To: <200410112233.49753@danielnaber.de> References: <1919087408.20041011114451@tut.by> <200410112233.49753@danielnaber.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello Daniel, Thanks for your reply. Your patch cures one of two failures. But there another test failure. junit.framework.ComparisonFailure: Expected:19700101010000000 Actual :19700101020000000 at org.apache.lucene.document.TestDateTools.testDateAndTimetoString(TestDateTools.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) by analogy with your changes i made changes in sources Index: src/test/org/apache/lucene/document/TestDateTools.java =================================================================== RCS file: /home/cvspublic/jakarta-lucene/src/test/org/apache/lucene/document/TestDateTools.java,v retrieving revision 1.2 diff -u -r1.2 TestDateTools.java --- src/test/org/apache/lucene/document/TestDateTools.java 11 Oct 2004 20:32:44 -0000 1.2 +++ src/test/org/apache/lucene/document/TestDateTools.java 12 Oct 2004 06:53:02 -0000 @@ -114,10 +114,16 @@ assertEquals("1961-03-05 23:00:00:000", isoFormat(DateTools.stringToDate(dateString))); // timeToString: - dateString = DateTools.timeToString(0, DateTools.Resolution.MILLISECOND); - assertEquals("19700101010000000", dateString); + cal.set(1970, 0, 1, // year=1970, month=january, day=1 + 0, 0, 0); // hour, minute, second + cal.set(Calendar.MILLISECOND, 0); + dateString = DateTools.timeToString(cal.getTime().getTime(), DateTools.Resolution.MILLISECOND); + assertEquals("19700101000000000", dateString); - dateString = DateTools.timeToString(123000, DateTools.Resolution.MILLISECOND); + cal.set(1970, 0, 1, // year=1970, month=january, day=1 + 1, 2, 3); // hour, minute, second + cal.set(Calendar.MILLISECOND, 0); + dateString = DateTools.timeToString(cal.getTime().getTime(), DateTools.Resolution.MILLISECOND); assertEquals("19700101010203000", dateString); } Monday, October 11, 2004, 11:33:49 PM, you wrote: > On Monday 11 October 2004 10:44, Anatol Pomozov wrote: >> I've updated source tree from CVS and tried to run unit tests. >> They are failed. See log below. > Could you try again? I just committed a supposed fix. > Regards > Daniel --anatol --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org