Search in sources :

Example 6 with EnvironmentSpecificProperties

use of org.jumpmind.properties.EnvironmentSpecificProperties in project symmetric-ds by JumpMind.

the class TestSetupUtil method prepareRoot.

protected static ISymmetricEngine prepareRoot(String sql) {
    removeEmbededdedDatabases();
    EnvironmentSpecificProperties properties = new EnvironmentSpecificProperties(new URL[] { getResource(DbTestUtils.DB_TEST_PROPERTIES), getResource("/symmetric-test.properties") }, "test.root", new String[] { "root" });
    if (StringUtils.isNotBlank(sql)) {
        properties.setProperty(ParameterConstants.AUTO_CONFIGURE_REG_SVR_SQL_SCRIPT, sql);
    }
    ISymmetricEngine engine = new ClientSymmetricEngine(properties);
    engine.getStagingManager().clean(0);
    dropAndCreateDatabaseTables(properties.getProperty("test.root"), engine);
    return engine;
}
Also used : EnvironmentSpecificProperties(org.jumpmind.properties.EnvironmentSpecificProperties) ClientSymmetricEngine(org.jumpmind.symmetric.ClientSymmetricEngine) ISymmetricEngine(org.jumpmind.symmetric.ISymmetricEngine)

Aggregations

EnvironmentSpecificProperties (org.jumpmind.properties.EnvironmentSpecificProperties)6 File (java.io.File)3 ClientSymmetricEngine (org.jumpmind.symmetric.ClientSymmetricEngine)3 ISymmetricEngine (org.jumpmind.symmetric.ISymmetricEngine)3 FileOutputStream (java.io.FileOutputStream)2 InterruptedException (org.jumpmind.exception.InterruptedException)2 SymmetricWebServer (org.jumpmind.symmetric.SymmetricWebServer)2 IOException (java.io.IOException)1 Database (org.jumpmind.db.model.Database)1 Table (org.jumpmind.db.model.Table)1 IDatabasePlatform (org.jumpmind.db.platform.IDatabasePlatform)1 SqlTemplateSettings (org.jumpmind.db.sql.SqlTemplateSettings)1 IoException (org.jumpmind.exception.IoException)1 Test (org.junit.Test)1