mirror of https://github.com/apache/lucene.git
SOLR-2045: suppress creation of derby.log during test
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1408377 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0de0c53e35
commit
b87c71a09b
|
@ -65,7 +65,12 @@ public abstract class AbstractDIHJdbcTestCase extends AbstractDataImportHandlerT
|
|||
public static void beforeClassDihJdbcTest() throws Exception {
|
||||
try {
|
||||
Class.forName("org.hsqldb.jdbcDriver").newInstance();
|
||||
String oldProp = System.getProperty("derby.stream.error.field");
|
||||
System.setProperty("derby.stream.error.field", "DerbyUtil.DEV_NULL");
|
||||
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
|
||||
if(oldProp!=null) {
|
||||
System.setProperty("derby.stream.error.field", oldProp);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
}
|
||||
|
@ -327,12 +332,7 @@ public abstract class AbstractDIHJdbcTestCase extends AbstractDataImportHandlerT
|
|||
Timestamp theTime = new Timestamp(System.currentTimeMillis() - 10000); //10 seconds ago
|
||||
try {
|
||||
if(dbToUse==Database.DERBY) {
|
||||
String oldProp = System.getProperty("derby.stream.error.field");
|
||||
System.setProperty("derby.stream.error.field", "DerbyUtil.DEV_NULL");
|
||||
conn = DriverManager.getConnection("jdbc:derby:memory:derbyDB;create=true");
|
||||
if(oldProp!=null) {
|
||||
System.setProperty("derby.stream.error.field", oldProp);
|
||||
}
|
||||
} else if(dbToUse==Database.HSQLDB) {
|
||||
conn = DriverManager.getConnection("jdbc:hsqldb:mem:.");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue