diff options
Diffstat (limited to 'sonar-testing-harness/src/main/java')
-rw-r--r-- | sonar-testing-harness/src/main/java/org/sonar/test/persistence/DatabaseTestCase.java | 7 |
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"); |