| From: | Mikko Tiihonen <mikko(dot)tiihonen(at)nitorcreations(dot)com> |
|---|---|
| To: | Dave Cramer <pg(at)fastcrypt(dot)com> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: Collection of small fixes to binary transfer code and unit tests |
| Date: | 2011-09-29 23:12:16 |
| Message-ID: | 4E84FB50.2000000@nitorcreations.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
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(at)fastcrypt(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Strunz | 2011-09-30 06:13:47 | metadata.getColumns() using Apache Tomcat / jndi |
| Previous Message | Dave Cramer | 2011-09-29 16:10:52 | Re: Collection of small fixes to binary transfer code and unit tests |