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;
}
Aggregations