[Minor] schema must be dropped in all tests...

This commit is contained in:
Robert von Burg 2013-12-25 17:40:30 +01:00
parent 36c02bad0c
commit fe3cca7cb3
2 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@ import static li.strolch.model.ModelGenerator.createResource;
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.sql.SQLException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@ -56,7 +57,9 @@ public class ObserverUpdateTest {
}
@BeforeClass
public static void beforeClass() {
public static void beforeClass() throws SQLException {
XmlCachedDaoTest.dropSchema();
File rootPath = new File(RUNTIME_PATH);
File configSrc = new File(CONFIG_SRC);

View File

@ -57,7 +57,7 @@ public class XmlCachedDaoTest extends AbstractModelTest {
runtimeMock.startContainer(rootPath);
}
private static void dropSchema() throws SQLException {
public static void dropSchema() throws SQLException {
String dbVersion = DbSchemaVersionCheck.getExpectedDbVersion();
String sql = DbSchemaVersionCheck.getSql(dbVersion, "drop"); //$NON-NLS-1$
try (Connection connection = DriverManager.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD)) {