Skip to content

Commit

Permalink
Cleaning up SQL scripting in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
hekonsek committed Feb 24, 2017
1 parent 1a0fcb9 commit 0a4e9d9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
6 changes: 5 additions & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@

<dependencies>
<!-- Internal dependencies -->
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-liquibase</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-security-authentication-api</artifactId>
</dependency>

<!-- External dependencies -->
<dependency>
<groupId>joda-time</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.eclipse.kapua.commons.jpa.CommonsEntityManagerFactory;
import org.eclipse.kapua.commons.jpa.EntityManager;
import org.eclipse.kapua.commons.jpa.SimpleSqlScriptExecutor;
import org.eclipse.kapua.service.liquibase.KapuaLiquibaseClient;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.slf4j.Logger;
Expand Down Expand Up @@ -68,7 +69,7 @@ public static void scriptSession(String path, String fileFilter)
public static void tearUp()
throws KapuaException
{
KapuaConfigurableServiceSchemaUtils.createSchemaObjects(DEFAULT_COMMONS_PATH);
new KapuaLiquibaseClient("jdbc:h2:mem:kapua;MODE=MySQL", "kapua", "kapua").update();
scriptSession(DEFAULT_TEST_PATH, DEFAULT_TEST_FILTER);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public void beforeScenario(Scenario scenario)
enableH2Connection();

// Create the account service tables
KapuaConfigurableServiceSchemaUtils.createSchemaObjects(DEFAULT_COMMONS_PATH);
new KapuaLiquibaseClient("jdbc:h2:mem:kapua;MODE=MySQL", "kapua", "kapua").update();
XmlUtil.setContextProvider(new AccountsJAXBContextProvider());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ public abstract class AbstractMessageStoreServiceTest extends KapuaTest
private static final Logger logger = LoggerFactory.getLogger(AbstractMessageStoreServiceTest.class);

public static String DEFAULT_COMMONS_PATH = "../commons";

@BeforeClass
public static void tearUp()
throws KapuaException
{
KapuaConfigurableServiceSchemaUtils.createSchemaObjects(DEFAULT_COMMONS_PATH);
}

@AfterClass
public static void tearDown()
Expand Down

0 comments on commit 0a4e9d9

Please sign in to comment.