pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Mike Fowler <mike@mlfowler.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Failing test in org.postgresql.test.jdbc2.DateTest
Date: Sat, 19 Mar 2011 20:12:15 -0400 (EDT)
Message-ID: <alpine.BSO.2.00.1103192010130.28447@leary.csoft.net> (raw)
In-Reply-To: <4D6B7795.1060400@mlfowler.com>
References: <4D6538EA.8080905@mlfowler.com>
	<4D655262.5060804@mlfowler.com>
	<4D6B7795.1060400@mlfowler.com>



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



view thread (6+ messages)

Message-ID: <alpine.BSO.2.00.1103192010130.28447@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.1103192010130.28447@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.1103192010130.28447@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, mike@mlfowler.com
  Subject: Re: Failing test in org.postgresql.test.jdbc2.DateTest
  In-Reply-To: <alpine.BSO.2.00.1103192010130.28447@leary.csoft.net>
  References: <4D6538EA.8080905@mlfowler.com> <4D655262.5060804@mlfowler.com> <4D6B7795.1060400@mlfowler.com> <alpine.BSO.2.00.1103192010130.28447@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox