aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/test
diff options
context:
space:
mode:
authorGodin <mandrikov@gmail.com>2010-12-07 13:30:45 +0000
committerGodin <mandrikov@gmail.com>2010-12-07 13:30:45 +0000
commit5726083b133c47fdaa12a88d4cfcd624db2f7112 (patch)
tree96e99a2aaf7bb3d455af6fb4e65c347c5ad52aa0 /sonar-server/src/test
parent1045ca4608b9d9d5627fc2ec022e0b9532e6972a (diff)
downloadsonarqube-5726083b133c47fdaa12a88d4cfcd624db2f7112.tar.gz
sonarqube-5726083b133c47fdaa12a88d4cfcd624db2f7112.zip
Change root directory for EmbeddedDatabaseTest
Diffstat (limited to 'sonar-server/src/test')
-rw-r--r--sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java b/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java
index 45b6433ac89..de6c13604c6 100644
--- a/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java
@@ -33,6 +33,7 @@ import java.util.Properties;
public class EmbeddedDatabaseTest extends TestCase {
+ private final static String TEST_ROOT_DIR = "./target/";
private final static String TEST_DB_DIR_PREFIX = "testDB";
private EmbeddedDatabase database;
@@ -54,7 +55,7 @@ public class EmbeddedDatabaseTest extends TestCase {
private void windowsCleanup() {
String os = System.getProperty("os.name");
if (os.toLowerCase().contains("windows")) {
- File testRoot = new File("./");
+ File testRoot = new File(TEST_ROOT_DIR);
File[] files = testRoot.listFiles();
for (File file : files) {
if (file.isDirectory() &&
@@ -77,7 +78,7 @@ public class EmbeddedDatabaseTest extends TestCase {
}
public void testStart() throws Exception {
- database = new EmbeddedDatabase(new File("./" + TEST_DB_DIR_PREFIX + "Start" + testPort), defaultProps);
+ database = new EmbeddedDatabase(new File(TEST_ROOT_DIR + TEST_DB_DIR_PREFIX + "Start" + testPort), defaultProps);
database.start();
ClientDriver.class.newInstance();
Connection conn = null;
@@ -102,7 +103,7 @@ public class EmbeddedDatabaseTest extends TestCase {
}
public void testStop() throws Exception {
- database = new EmbeddedDatabase(new File("./" + TEST_DB_DIR_PREFIX + "Stop" + testPort), defaultProps);
+ database = new EmbeddedDatabase(new File(TEST_ROOT_DIR + TEST_DB_DIR_PREFIX + "Stop" + testPort), defaultProps);
database.start();
ClientDriver.class.newInstance();
Connection conn = null;
@@ -136,4 +137,3 @@ public class EmbeddedDatabaseTest extends TestCase {
}
}
-