pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Fowler <mike@mlfowler.com>
To: List <pgsql-jdbc@postgresql.org>
Subject: Buildfarm test failure
Date: Thu, 01 Nov 2012 20:52:33 +0000
Message-ID: <5092E111.8000306@mlfowler.com> (raw)

The buildfarm failed last night whilst performing the JDK 5 builds:

testjar:
     [mkdir] Created dir: /home/ubuntu/buildarea/HEAD/pgjdbc/build/tests
     [javac] /home/ubuntu/buildarea/HEAD/pgjdbc/build.xml:399: warning: 
'includeantruntime' was not set, defaulting to build.sysclasspath=last; 
set to false for repeatable builds
     [javac] Compiling 58 source files to 
/home/ubuntu/buildarea/HEAD/pgjdbc/build/tests
     [javac] 
/home/ubuntu/buildarea/HEAD/pgjdbc/org/postgresql/test/jdbc2/ArrayTest.java:213: 
cannot find symbol
     [javac] symbol  : method 
createArrayOf(java.lang.String,java.lang.String[])
     [javac] location: interface java.sql.Connection
     [javac]         Array sqlArray = conn.createArrayOf("text", strArray);
     [javac]                              ^
     [javac] Note: Some input files use or override a deprecated API.
     [javac] Note: Recompile with -Xlint:deprecation for details.
     [javac] Note: Some input files use unchecked or unsafe operations.
     [javac] Note: Recompile with -Xlint:unchecked for details.
     [javac] 1 error

I've done some digging and it appears that a test of a JDBC4 method has 
ended up in the JDBC2 test suite. I've attached a patch that removes the 
offending test and there is no need to add it to the corresponding JDBC4 
tests as it is already present.

Kind regards,
-- 
Mike Fowler
Registered Linux user: 379787

Attachments:

testfix.patch (text/x-diff, 1.6K) download *** a/org/postgresql/test/jdbc2/ArrayTest.java --- b/org/postgresql/test/jdbc2/ArrayTest.java *************** *** 186,222 **** public class ArrayTest extends TestCase assertEquals(3, resultCount); } - public void testSetObjectFromJavaArray() throws SQLException { - String[] strArray = new String[]{"a","b","c"}; - - PreparedStatement pstmt = conn.prepareStatement("INSERT INTO arrtest(strarr) VALUES (?)"); - - // Incorrect, but commonly attempted by many ORMs: - try { - pstmt.setObject(1, strArray, Types.ARRAY); - pstmt.executeUpdate(); - fail("setObject() with a Java array parameter and Types.ARRAY shouldn't succeed"); - } catch (org.postgresql.util.PSQLException ex) { - // Expected failure. - } - - // Also incorrect, but commonly attempted by many ORMs: - try { - pstmt.setObject(1, strArray); - pstmt.executeUpdate(); - fail("setObject() with a Java array parameter and no Types argument shouldn't succeed"); - } catch (org.postgresql.util.PSQLException ex) { - // Expected failure. - } - - // Correct way, though the use of "text" as a type is non-portable. - Array sqlArray = conn.createArrayOf("text", strArray); - pstmt.setArray(1, sqlArray); - pstmt.executeUpdate(); - - pstmt.close(); - } - /** * Starting with 8.0 non-standard (beginning index isn't 1) bounds * the dimensions are returned in the data. The following should --- 186,191 ----

view thread (5+ messages)  latest in thread

Message-ID: <5092E111.8000306@mlfowler.com>
Permalink:  ../5092E111.8000306@mlfowler.com/
Also on:    postgresql.org/message-id/5092E111.8000306@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 failure
  In-Reply-To: <5092E111.8000306@mlfowler.com>
  References: <5092E111.8000306@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