diff options
author | Dave Cramer <davec@fastcrypt.com> | 2003-12-18 04:17:17 +0000 |
---|---|---|
committer | Dave Cramer <davec@fastcrypt.com> | 2003-12-18 04:17:17 +0000 |
commit | b4ed1edb57113c0de4ea881d9688a23b3396d13b (patch) | |
tree | 0d79ed6b038f12946d78a43efbd01f95597ec2ab | |
parent | b9deede24139f64cb2dc609ca46ae9cfe0b062a9 (diff) | |
download | postgresql-b4ed1edb57113c0de4ea881d9688a23b3396d13b.tar.gz postgresql-b4ed1edb57113c0de4ea881d9688a23b3396d13b.zip |
patch for new OID74Test
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/test/TestUtil.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/test/TestUtil.java b/src/interfaces/jdbc/org/postgresql/test/TestUtil.java index 6b139435a54..9ef0c7d899f 100644 --- a/src/interfaces/jdbc/org/postgresql/test/TestUtil.java +++ b/src/interfaces/jdbc/org/postgresql/test/TestUtil.java @@ -2,6 +2,7 @@ package org.postgresql.test; import java.sql.*; import junit.framework.TestCase; +import java.util.Properties; /* * Utility class for JDBC tests @@ -61,10 +62,21 @@ public class TestUtil */ public static java.sql.Connection openDB() { + return openDB(new Properties()); + } + + /* + * Helper - opens a connection with the allowance for passing + * additional parameters, like "compatible". + */ + public static java.sql.Connection openDB(Properties props) + { + props.setProperty("user",getUser()); + props.setProperty("password",getPassword()); try { Class.forName("org.postgresql.Driver"); - return java.sql.DriverManager.getConnection(getURL(), getUser(), getPassword()); + return java.sql.DriverManager.getConnection(getURL(), props); } catch (ClassNotFoundException ex) { |