pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
To: pgsql-jdbc@postgresql.org
Subject: Binary transfer support [7/7] - testing in ide
Date: Fri, 16 Sep 2011 16:14:35 +0300
Message-ID: <4E734BBB.6090102@nitorcreations.com> (raw )
Attachments:
ide-testing.patch (text/plain, 2.3K) download
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.
Message-ID: <4E734BBB.6090102@nitorcreations.com>
Permalink: ../4E734BBB.6090102@nitorcreations.com/
Also on: postgresql.org/message-id/4E734BBB.6090102@nitorcreations.com
copy link · copy postgr.es · copy git am
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: mikko.tiihonen@nitorcreations.com
Subject: Re: Binary transfer support [7/7] - testing in ide
In-Reply-To: <4E734BBB.6090102@nitorcreations.com>
References: <4E734BBB.6090102@nitorcreations.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