Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb4ed1ed

Browse files
author
Dave Cramer
committed
patch for new OID74Test
1 parentb9deede commitb4ed1ed

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
importjava.sql.*;
44
importjunit.framework.TestCase;
5+
importjava.util.Properties;
56

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp