Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E0AF4B5DBDA for ; Fri, 16 Sep 2011 10:25:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 96670-06 for ; Fri, 16 Sep 2011 13:24:32 +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 EF1EDB5DBCE for ; Fri, 16 Sep 2011 10:24:29 -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 p8GDEYiS007839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Sep 2011 16:14:34 +0300 Message-ID: <4E734BBB.6090102@nitorcreations.com> Date: Fri, 16 Sep 2011 16:14:35 +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: pgsql-jdbc@postgresql.org Subject: Binary transfer support [7/7] - testing in ide Content-Type: multipart/mixed; boundary="------------000209010005010001020409" 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/41 X-Sequence-Number: 22159 This is a multi-part message in MIME format. --------------000209010005010001020409 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit --------------000209010005010001020409 Content-Type: text/plain; name="ide-testing.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ide-testing.patch" Index: pgjdbc.tmp2/org/postgresql/test/TestUtil.java =================================================================== --- pgjdbc.tmp2.orig/org/postgresql/test/TestUtil.java +++ pgjdbc.tmp2/org/postgresql/test/TestUtil.java @@ -9,6 +9,9 @@ */ package org.postgresql.test; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; import java.sql.*; import java.util.Properties; @@ -49,7 +52,7 @@ public class TestUtil */ public static String getServer() { - return System.getProperty("server"); + return System.getProperty("server", "localhost"); } /* @@ -57,7 +60,7 @@ public class TestUtil */ public static int getPort() { - return Integer.parseInt(System.getProperty("port")); + return Integer.parseInt(System.getProperty("port", System.getProperty("def_pgport"))); } /* @@ -65,12 +68,12 @@ public class TestUtil */ public static int getPrepareThreshold() { - return Integer.parseInt(System.getProperty("preparethreshold")); + return Integer.parseInt(System.getProperty("preparethreshold", "5")); } public static int getProtocolVersion() { - return Integer.parseInt(System.getProperty("protocolVersion")); + return Integer.parseInt(System.getProperty("protocolVersion", "0")); } /* @@ -102,7 +105,7 @@ public class TestUtil */ public static int getLogLevel() { - return Integer.parseInt(System.getProperty("loglevel")); + return Integer.parseInt(System.getProperty("loglevel", "0")); } /* @@ -120,6 +123,16 @@ public class TestUtil if (initialized) return; + Properties p = new Properties(); + try { + p.load(new FileInputStream("build.properties")); + p.load(new FileInputStream("build.local.properties")); + } catch (IOException ex) { + // ignore + } + p.putAll(System.getProperties()); + System.getProperties().putAll(p); + if (getLogLevel() > 0) { // Ant's junit task likes to buffer stdout/stderr and tends to run out of memory. // So we put debugging output to a file instead. --------------000209010005010001020409--