diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-04-28 11:59:48 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-04-28 11:59:48 +0200 |
commit | 7dd514a1d598fe2d15613af864401aa11442667e (patch) | |
tree | 66e0a947169f5a572b17b386e40f9c807e4f17d7 | |
parent | a426f3249011ff35f300460c934e2d6b058f1625 (diff) | |
download | sonarqube-7dd514a1d598fe2d15613af864401aa11442667e.tar.gz sonarqube-7dd514a1d598fe2d15613af864401aa11442667e.zip |
Move derby logs generated during unit tests to target/
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | sonar-testing-harness/src/main/java/org/sonar/test/persistence/DatabaseTestCase.java | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index ef28c42b83b..5aec99e7667 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ sonar-server/src/main/webapp/deploy/gwt sonar-server/src/main/webapp/deploy/plugins sonar-server/src/main/webapp/deploy/jdbc-driver.jar sonar-server/src/main/webapp/deploy/maven/org -plugins/sonar-core-plugin/derby.log +sonar-server/src/main/webapp/WEB-INF/log/ # javadoc docs.tar 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"); |