Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 70F4D1337C42 for ; Sat, 19 Mar 2011 21:13:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 92655-02-2 for ; Sun, 20 Mar 2011 00:12:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 6EC4C1337C11 for ; Sat, 19 Mar 2011 21:12:15 -0300 (ADT) Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id CE9A32840E; Sat, 19 Mar 2011 20:12:15 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 6D3CCA3DA; Sat, 19 Mar 2011 20:12:15 -0400 (EDT) Date: Sat, 19 Mar 2011 20:12:15 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Mike Fowler cc: pgsql-jdbc@postgresql.org Subject: Re: Failing test in org.postgresql.test.jdbc2.DateTest In-Reply-To: <4D6B7795.1060400@mlfowler.com> Message-ID: References: <4D6538EA.8080905@mlfowler.com> <4D655262.5060804@mlfowler.com> <4D6B7795.1060400@mlfowler.com> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/35 X-Sequence-Number: 21590 On Mon, 28 Feb 2011, Mike Fowler wrote: > On 23/02/11 18:30, Mike Fowler wrote: >> On 23/02/11 16:42, I wrote: >>> >>> I've attached a patch to do just that and it's been tested with the >>> following JDKs: >>> >>> 1.4.2_19 >>> 1.5.0_22 >>> 1.6.0_21 >>> >>> Regards, >>> >> Oops, hold the phone. The test still broke on 1.6 but I didn't notice the >> error as the "build succeeded". The year value 23456 causes the test to >> fail as the maximum year in java.sql.date is 9999. However, when I change >> the year to 3456 the test fails: >> >> [junit] expected:<3456-01-01> but was:<456-01-01> > > Turns out there was another place where a date was being set to 23456-01-01, > which was misinterpreted by the 1.6 java.sql.Date. Attached is the patch that > brings all the date tests in line with the published API. This has been > tested on the three JDKs as noted above, and for all three the test output > is: This changed somewhere in the 1.6 release because the 1.6.0_11 version I have here doesn't have any problem with the original code, but clearly our tests must work with the latest JVM. I've applied your patch to 8.2 and up in CVS. Thanks, Kris Jurka