Skip to content

Commit b4ed1ed

Browse files
author
Dave Cramer
committed
patch for new OID74Test
1 parent b9deede commit b4ed1ed

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/interfaces/jdbc/org/postgresql/test/TestUtil.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.sql.*;
44
import junit.framework.TestCase;
5+
import java.util.Properties;
56

67
/*
78
* Utility class for JDBC tests
@@ -61,10 +62,21 @@ public static String getPassword()
6162
*/
6263
public static java.sql.Connection openDB()
6364
{
65+
return openDB(new Properties());
66+
}
67+
68+
/*
69+
* Helper - opens a connection with the allowance for passing
70+
* additional parameters, like "compatible".
71+
*/
72+
public static java.sql.Connection openDB(Properties props)
73+
{
74+
props.setProperty("user",getUser());
75+
props.setProperty("password",getPassword());
6476
try
6577
{
6678
Class.forName("org.postgresql.Driver");
67-
return java.sql.DriverManager.getConnection(getURL(), getUser(), getPassword());
79+
return java.sql.DriverManager.getConnection(getURL(), props);
6880
}
6981
catch (ClassNotFoundException ex)
7082
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy