Skip to content
Snippets Groups Projects
Commit b4ed1edb authored by Dave Cramer's avatar Dave Cramer
Browse files

patch for new OID74Test

parent b9deede2
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ package org.postgresql.test; ...@@ -2,6 +2,7 @@ package org.postgresql.test;
import java.sql.*; import java.sql.*;
import junit.framework.TestCase; import junit.framework.TestCase;
import java.util.Properties;
/* /*
* Utility class for JDBC tests * Utility class for JDBC tests
...@@ -61,10 +62,21 @@ public class TestUtil ...@@ -61,10 +62,21 @@ public class TestUtil
*/ */
public static java.sql.Connection openDB() 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 try
{ {
Class.forName("org.postgresql.Driver"); Class.forName("org.postgresql.Driver");
return java.sql.DriverManager.getConnection(getURL(), getUser(), getPassword()); return java.sql.DriverManager.getConnection(getURL(), props);
} }
catch (ClassNotFoundException ex) catch (ClassNotFoundException ex)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment