1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

patch for rs.previous and test case as well as patch for allowing server and port to be specified in test cases

This commit is contained in:
Dave Cramer
2003-11-03 15:28:26 +00:00
parent efea5da4fa
commit b720fa96fb
9 changed files with 42 additions and 68 deletions

View File

@ -10,7 +10,7 @@ import org.postgresql.jdbc3.*;
* Tests JDBC3 non-pooling DataSource.
*
* @author Aaron Mulder (ammulder@chariotsolutions.com)
* @version $Revision: 1.1 $
* @version $Revision: 1.2 $
*/
public class Jdbc3SimpleDataSourceTest extends SimpleDataSourceTest {
/**
@ -29,16 +29,9 @@ public class Jdbc3SimpleDataSourceTest extends SimpleDataSourceTest {
if (bds == null)
{
bds = new Jdbc3SimpleDataSource();
String db = TestUtil.getURL();
if (db.indexOf('/') > -1)
{
db = db.substring(db.lastIndexOf('/') + 1);
}
else if (db.indexOf(':') > -1)
{
db = db.substring(db.lastIndexOf(':') + 1);
}
bds.setDatabaseName(db);
bds.setServerName(TestUtil.getServer());
bds.setPortNumber(TestUtil.getPort());
bds.setDatabaseName(TestUtil.getDatabase());
bds.setUser(TestUtil.getUser());
bds.setPassword(TestUtil.getPassword());
}