use of org.apache.commons.configuration.AbstractConfiguration in project incubator-servicecomb-java-chassis by apache.
the class TestConfigUtil method testCreateConfigFromConfigCenterNoUrl.
@Test
public void testCreateConfigFromConfigCenterNoUrl(@Mocked Configuration localConfiguration) {
AbstractConfiguration configFromConfigCenter = ConfigUtil.createConfigFromConfigCenter(localConfiguration);
Assert.assertNull(configFromConfigCenter);
}
use of org.apache.commons.configuration.AbstractConfiguration in project incubator-servicecomb-java-chassis by apache.
the class TestConfigUtil method testCreateDynamicConfigHasConfigCenter.
@Test
public void testCreateDynamicConfigHasConfigCenter(@Mocked ConfigCenterConfigurationSource configCenterConfigurationSource) {
AbstractConfiguration dynamicConfig = ConfigUtil.createDynamicConfig();
Assert.assertEquals(DynamicWatchedConfiguration.class, ((ConcurrentCompositeConfiguration) dynamicConfig).getConfiguration(0).getClass());
}
use of org.apache.commons.configuration.AbstractConfiguration in project incubator-servicecomb-java-chassis by apache.
the class TestLoadbalanceHandler method beforeCls.
@BeforeClass
public static void beforeCls() {
ConfigUtil.installDynamicConfig();
AbstractConfiguration configuration = (AbstractConfiguration) DynamicPropertyFactory.getBackingConfigurationSource();
configuration.addProperty("cse.loadbalance.test.transactionControl.policy", "org.apache.servicecomb.loadbalance.filter.SimpleTransactionControlFilter");
configuration.addProperty("cse.loadbalance.test.transactionControl.options.tag0", "value0");
configuration.addProperty("cse.loadbalance.test.isolation.enabled", "true");
configuration.addProperty("cse.loadbalance.serverListFilters", "a");
configuration.addProperty("cse.loadbalance.serverListFilter.a.className", "org.apache.servicecomb.loadbalance.MyServerListFilterExt");
}
use of org.apache.commons.configuration.AbstractConfiguration in project incubator-servicecomb-java-chassis by apache.
the class TestSimpleTransactionControlFilter method beforeCls.
@BeforeClass
public static void beforeCls() {
AbstractConfiguration configuration = new BaseConfiguration();
configuration.addProperty("cse.loadbalance.test.flowsplitFilter.policy", "org.apache.servicecomb.loadbalance.filter.SimpleFlowsplitFilter");
configuration.addProperty("cse.loadbalance.test.flowsplitFilter.options.tag0", "value0");
}
use of org.apache.commons.configuration.AbstractConfiguration in project incubator-gobblin by apache.
the class DatabaseJobHistoryStoreSchemaManager method getProperties.
private static Properties getProperties(Configuration config) {
Properties props = new Properties();
char delimiter = (config instanceof AbstractConfiguration) ? ((AbstractConfiguration) config).getListDelimiter() : ',';
Iterator keys = config.getKeys();
while (keys.hasNext()) {
String key = (String) keys.next();
List list = config.getList(key);
props.setProperty("flyway." + key, StringUtils.join(list.iterator(), delimiter));
}
return props;
}
Aggregations