aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/jdbc/org/postgresql/test/TestUtil.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/test/TestUtil.java b/src/interfaces/jdbc/org/postgresql/test/TestUtil.java
index 930215ed380..6b139435a54 100644
--- a/src/interfaces/jdbc/org/postgresql/test/TestUtil.java
+++ b/src/interfaces/jdbc/org/postgresql/test/TestUtil.java
@@ -13,6 +13,30 @@ public class TestUtil
*/
public static String getURL()
{
+ return "jdbc:postgresql://"+getServer()+":"+getPort()+"/"+getDatabase();
+ }
+
+ /*
+ * Returns the Test server
+ */
+ public static String getServer()
+ {
+ return System.getProperty("server");
+ }
+
+ /*
+ * Returns the Test port
+ */
+ public static int getPort()
+ {
+ return Integer.parseInt(System.getProperty("port"));
+ }
+
+ /*
+ * Returns the Test database
+ */
+ public static String getDatabase()
+ {
return System.getProperty("database");
}