ensure data dir is empty for test as derby needs clean dir

This commit is contained in:
gtully 2015-06-18 16:12:57 +01:00
parent e3a72cfa1d
commit da3174cf98
1 changed files with 8 additions and 0 deletions

View File

@ -16,12 +16,15 @@
*/
package org.apache.activemq.store.jdbc;
import java.io.File;
import java.sql.SQLException;
import java.util.LinkedList;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.network.NetworkBrokerDetachTest;
import org.apache.activemq.util.IOHelper;
import org.apache.derby.jdbc.EmbeddedDataSource;
import org.junit.After;
import org.junit.BeforeClass;
public class JDBCNetworkBrokerDetachTest extends NetworkBrokerDetachTest {
@ -55,4 +58,9 @@ public class JDBCNetworkBrokerDetachTest extends NetworkBrokerDetachTest {
}
dataSources.clear();
}
@BeforeClass
public static void ensureDerbyHasCleanDirectory() throws Exception {
IOHelper.delete(new File(IOHelper.getDefaultDataDirectory()));
}
}