Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 27CFFB5D801 for ; Thu, 29 Sep 2011 20:12:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 62000-02 for ; Thu, 29 Sep 2011 23:12:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from auth-smtp.nebula.fi (auth-smtp.nebula.fi [217.30.180.105]) by mail.postgresql.org (Postfix) with ESMTP id 3E055B5D803 for ; Thu, 29 Sep 2011 20:12:21 -0300 (ADT) Received: from quadvadis.localdomain (gw.nitor.fi [83.145.228.24]) (authenticated bits=0) by auth-smtp.nebula.fi (8.13.4/8.13.4) with ESMTP id p8TNCEvs012009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2011 02:12:15 +0300 Message-ID: <4E84FB50.2000000@nitorcreations.com> Date: Fri, 30 Sep 2011 02:12:16 +0300 From: Mikko Tiihonen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: Dave Cramer CC: pgsql-jdbc@postgresql.org Subject: Re: Collection of small fixes to binary transfer code and unit tests References: <4E836AB2.9030201@nitorcreations.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201109/130 X-Sequence-Number: 22248 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 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