pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Fowler <mike@mlfowler.com>
To: pgsql-jdbc@postgresql.org
Subject: Buildfarm test failures on JDK 5
Date: Fri, 16 May 2014 10:52:00 +0100
Message-ID: <24279d97375a2e33915b5c925933a608.squirrel@www.mlfowler.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

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

-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Attachments:

jdk5-fix.patch (text/x-diff, 2.2K) download *** 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();

view thread (7+ messages)  latest in thread

Message-ID: <24279d97375a2e33915b5c925933a608.squirrel@www.mlfowler.com>
Permalink:  ../24279d97375a2e33915b5c925933a608.squirrel@www.mlfowler.com/
Also on:    postgresql.org/message-id/24279d97375a2e33915b5c925933a608.squirrel@www.mlfowler.com

 ·  · 

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: mike@mlfowler.com
  Subject: Re: Buildfarm test failures on JDK 5
  In-Reply-To: <24279d97375a2e33915b5c925933a608.squirrel@www.mlfowler.com>
  References: <24279d97375a2e33915b5c925933a608.squirrel@www.mlfowler.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