Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlEoF-00012U-C6 for pgsql-jdbc@arkaria.postgresql.org; Fri, 16 May 2014 09:52:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WlEoD-00028W-LR for pgsql-jdbc@arkaria.postgresql.org; Fri, 16 May 2014 09:52:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlEoB-00028M-Mv for pgsql-jdbc@postgresql.org; Fri, 16 May 2014 09:52:07 +0000 Received: from [64.71.164.66] (helo=paris.hostgo.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WlEo7-0004BT-Qg for pgsql-jdbc@postgresql.org; Fri, 16 May 2014 09:52:07 +0000 Received: from localhost ([::1]:37016 helo=www.mlfowler.com) by paris.hostgo.com with esmtpa (Exim 4.82) (envelope-from ) id 1WlEo4-0004vb-4w for pgsql-jdbc@postgresql.org; Fri, 16 May 2014 05:52:00 -0400 Received: from 94.125.132.77 ([94.125.132.77]) (SquirrelMail authenticated user mike@mlfowler.com) by www.mlfowler.com with HTTP; Fri, 16 May 2014 10:52:00 +0100 Message-ID: <24279d97375a2e33915b5c925933a608.squirrel@www.mlfowler.com> Date: Fri, 16 May 2014 10:52:00 +0100 Subject: Buildfarm test failures on JDK 5 From: "Mike Fowler" To: pgsql-jdbc@postgresql.org User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20140516105200_92122" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - paris.hostgo.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mlfowler.com X-Get-Message-Sender-Via: paris.hostgo.com: authenticated_id: mike@mlfowler.com X-Source: X-Source-Args: X-Source-Dir: X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.71.164.66 (failed) X-Pg-Spam-Score: 1.6 (+) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org ------=_20140516105200_92122 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit The PG-JDBC buildfarm member (http://www.pgbuildfarm.org/cgi-bin/show_status.pl?member=piapiac) has been failing to build for JDK 5 for the last 18 days. I've attached a patch that corrects the tests that have been added that used methods introduced in JDK 6. Apologies for not noticing the issue sooner - I really ought to but some sort of alerting in place! Kind regards, -- Mike Fowler Registered Linux user: 379787 ------=_20140516105200_92122 Content-Type: text/x-diff; name="jdk5-fix.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="jdk5-fix.patch" *** a/org/postgresql/test/jdbc2/BlobTransactionTest.java --- b/org/postgresql/test/jdbc2/BlobTransactionTest.java *************** *** 13,24 **** import junit.framework.TestCase; import java.io.*; import java.sql.*; - import java.util.Arrays; - import java.util.Collections; import javax.sql.rowset.serial.SerialBlob; - import org.postgresql.largeobject.*; /** * Test that oid/lob are accessible in concurrent connection, in presence of the lo_manage trigger --- 13,21 ---- *************** *** 100,111 **** public class BlobTransactionTest extends TestCase while((d = is.read()) != -1) { if (readPos == result.length) { ! result = Arrays.copyOf(result, result.length * 2); } result[readPos++] = (byte)d; } ! return Arrays.copyOf(result, readPos); } public void testConcurrentReplace() throws SQLException, IOException { --- 97,114 ---- while((d = is.read()) != -1) { if (readPos == result.length) { ! result = resizeArray(result, result.length * 2); } result[readPos++] = (byte)d; } ! return resizeArray(result, readPos); ! } ! ! private byte[] resizeArray(byte [] original, int length) { ! byte [] copy = new byte[length]; ! System.arraycopy(original, 0, copy, 0, original.length); ! return copy; } public void testConcurrentReplace() throws SQLException, IOException { *** a/org/postgresql/test/jdbc2/CopyTest.java --- b/org/postgresql/test/jdbc2/CopyTest.java *************** *** 281,287 **** public class CopyTest extends TestCase { { con.setAutoCommit(false); con.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ); ! CopyManager manager = con.unwrap(PGConnection.class).getCopyAPI(); Statement stmt = con.createStatement(); --- 281,287 ---- { con.setAutoCommit(false); con.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ); ! CopyManager manager = ((PGConnection) con).getCopyAPI(); Statement stmt = con.createStatement(); ------=_20140516105200_92122 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc ------=_20140516105200_92122--