aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-04-28 11:59:48 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-04-28 11:59:48 +0200
commit7dd514a1d598fe2d15613af864401aa11442667e (patch)
tree66e0a947169f5a572b17b386e40f9c807e4f17d7 /sonar-testing-harness/src
parenta426f3249011ff35f300460c934e2d6b058f1625 (diff)
downloadsonarqube-7dd514a1d598fe2d15613af864401aa11442667e.tar.gz
sonarqube-7dd514a1d598fe2d15613af864401aa11442667e.zip
Move derby logs generated during unit tests to target/
Diffstat (limited to 'sonar-testing-harness/src')
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/persistence/DatabaseTestCase.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/persistence/DatabaseTestCase.java b/sonar-testing-harness/src/main/java/org/sonar/test/persistence/DatabaseTestCase.java
index 9bd6aa688c3..ba9e47b6e76 100644
--- a/sonar-testing-harness/src/main/java/org/sonar/test/persistence/DatabaseTestCase.java
+++ b/sonar-testing-harness/src/main/java/org/sonar/test/persistence/DatabaseTestCase.java
@@ -52,6 +52,13 @@ public abstract class DatabaseTestCase {
@BeforeClass
public static void startDatabase() throws Exception {
+ System.setProperty("derby.stream.error.file", "target/derby.log");
+
+ /*
+ Note: we could use a datasource instead of a direct JDBC connection.
+ See org.apache.derby.jdbc.ClientDataSource (http://db.apache.org/derby/papers/DerbyClientSpec.html#Connection+URL+Format)
+ and org.dbunit.DataSourceDatabaseTester
+ */
EmbeddedDriver driver = new EmbeddedDriver();
DriverManager.registerDriver(driver);
databaseTester = new JdbcDatabaseTester(driver.getClass().getName(), JDBC_URL + ";create=true");