Skip to content
Snippets Groups Projects
Commit 77a9fd44 authored by pkupczyk's avatar pkupczyk
Browse files

LMS-2655 - Create a unit test to check imaging db consistency

SVN: 23648
parent e130a5ec
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,7 @@ import java.io.File; ...@@ -20,6 +20,7 @@ import java.io.File;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import org.apache.commons.io.FileUtils;
import org.testng.AssertJUnit; import org.testng.AssertJUnit;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
...@@ -69,7 +70,7 @@ public abstract class SqlMigrationTestAbstract ...@@ -69,7 +70,7 @@ public abstract class SqlMigrationTestAbstract
File dir = new File(getSqlScriptOutputDirectory()); File dir = new File(getSqlScriptOutputDirectory());
if (dir.exists()) if (dir.exists())
{ {
dir.delete(); FileUtils.deleteDirectory(dir);
} }
} }
...@@ -90,7 +91,7 @@ public abstract class SqlMigrationTestAbstract ...@@ -90,7 +91,7 @@ public abstract class SqlMigrationTestAbstract
// create first version of migration database // create first version of migration database
DBMigrationEngine.createOrMigrateDatabaseAndGetScriptProvider(migrationContext, DBMigrationEngine.createOrMigrateDatabaseAndGetScriptProvider(migrationContext,
firstVersion); firstVersion);
migrationContext.setCreateFromScratch(false); migrationContext.setCreateFromScratch(false);
for (int version = firstVersionInt + 1; version <= newestVersionInt; version++) for (int version = firstVersionInt + 1; version <= newestVersionInt; version++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment