From: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Collection of small fixes to binary transfer code and unit tests
Date: Fri, 30 Sep 2011 02:12:16 +0300
Message-ID: <4E84FB50.2000000@nitorcreations.com> (raw)
In-Reply-To: <CADK3HHK1iJY1U7EB9ywGXG2qqouVWhgUkSLqUtpLswqyXCeEHg@mail.gmail.com>
References: <4E836AB2.9030201@nitorcreations.com>
<CADK3HHJpQ_09iOUtz6rNyB0UZ3wzSZMG+8CBkEJOHC28M9iPiw@mail.gmail.com>
<CADK3HHK1iJY1U7EB9ywGXG2qqouVWhgUkSLqUtpLswqyXCeEHg@mail.gmail.com>
On 09/29/2011 07:10 PM, Dave Cramer wrote:
> Interestingly I do not see these errors when I run the test inside of
> eclipse, but I do when I run it from ant.
The build.xml forces binary transfers by default.
(maybe we should alter it to run all tests twice, once with binary transfer enabled, another with disabled?)
> On Thu, Sep 29, 2011 at 7:53 AM, Dave Cramer<pg@fastcrypt.com> wrote:
>> Mikko,
>>
>> I get the following errors after applying your patch.
>>
>> [junit] Testcase:
>> testMaxFieldSize(org.postgresql.test.jdbc2.ResultSetTest):
>> FAILED
>> [junit] null expected:<[12345]> but was:<[09]>
>> [junit] junit.framework.ComparisonFailure: null expected:<[12345]>
>> but was:<[09]>
>> [junit] at
>> org.postgresql.test.jdbc2.ResultSetTest.testMaxFieldSize(ResultSetTest.java:174)
Are you sure you applied the binary-fix-maxfieldlength-test.patch - the above failure looks like what it is trying to fix.
>> [junit] Testcase:
>> testGetTimestampWTZ(org.postgresql.test.jdbc2.TimestampTest):
>> FAILED
>> [junit] expected:<2000-07-07 11:00:00.123> but was:<2000-07-07
>> 11:00:00.122999>
>> [junit] junit.framework.AssertionFailedError: expected:<2000-07-07
>> 11:00:00.123> but was:<2000-07-07 11:00:00.122999>
>> [junit] at
>> org.postgresql.test.jdbc2.TimestampTest.timestampTestWTZ(TimestampTest.java:436)
>> [junit] at
>> org.postgresql.test.jdbc2.TimestampTest.testGetTimestampWTZ(TimestampTest.java:188)
>> [junit]
>> [junit]
>> [junit] Testcase:
>> testSetTimestampWTZ(org.postgresql.test.jdbc2.TimestampTest):
>> FAILED
>> [junit] expected:<2000-07-07 11:00:00.123> but was:<2000-07-07
>> 11:00:00.122999>
>> [junit] junit.framework.AssertionFailedError: expected:<2000-07-07
>> 11:00:00.123> but was:<2000-07-07 11:00:00.122999>
>> [junit] at
>> org.postgresql.test.jdbc2.TimestampTest.timestampTestWTZ(TimestampTest.java:436)
>> [junit] at
>> org.postgresql.test.jdbc2.TimestampTest.testSetTimestampWTZ(TimestampTest.java:258)
This is quite interesting: Expected <2000-07-07 11:00:00.123> but was:<2000-07-07 11:00:00.122999>
It looks like a rounding error. Do you happen to have integer datetime disabled in backend (which means
that it is using float8 internally to store the time).
-Mikko
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: mikko.tiihonen@nitorcreations.com, pg@fastcrypt.com
Subject: Re: Collection of small fixes to binary transfer code and unit tests
In-Reply-To: <4E84FB50.2000000@nitorcreations.com>
References: <4E836AB2.9030201@nitorcreations.com> <CADK3HHJpQ_09iOUtz6rNyB0UZ3wzSZMG+8CBkEJOHC28M9iPiw@mail.gmail.com> <CADK3HHK1iJY1U7EB9ywGXG2qqouVWhgUkSLqUtpLswqyXCeEHg@mail.gmail.com> <4E84FB50.2000000@nitorcreations.com>
* 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