Package com.netflix.config

Examples of com.netflix.config.DynamicURLConfiguration


        System.setProperty("archaius.configurationSource.defaultFileName", "test.properties");
    }
   
    @Test
    public void testFileURL() {
        DynamicURLConfiguration config = new DynamicURLConfiguration();
        Assert.assertEquals(5, config.getInt("com.netflix.config.samples.SampleApp.SampleBean.numSeeds"));
    }
View Full Code Here


        File file = new File("src/test/resources/test.properties");
        populateFile(file, "test.host=12312,123213", "test.host1=13212");

        AbstractConfiguration.setDefaultListDelimiter(',');
        DynamicURLConfiguration config = new DynamicURLConfiguration(0, 500, false, file.toURI().toString());
        Thread.sleep(1000);
        Assert.assertEquals(13212, config.getInt("test.host1"));
        Thread.sleep(1000);
        populateFile(file, "test.host=12312,123213", "test.host1=13212");
        populateFile(file, "test.host=12312,123213", "test.host1=13212");
        CopyOnWriteArrayList writeList = new CopyOnWriteArrayList();
        writeList.add("12312");
        writeList.add("123213");
        config.setProperty("sample.domain", "google,yahoo");
        Assert.assertEquals(writeList, config.getProperty("test.host"));
       

    }
View Full Code Here

public class DynamicURLConfigurationTest {

    @Test
    public void testNoURLsAvailable() {
        try {
            DynamicURLConfiguration config = new DynamicURLConfiguration();
            assertFalse(config.getKeys().hasNext());
        } catch (Throwable e) {
            fail("Unexpected exception");
        }
       
    }
View Full Code Here

TOP

Related Classes of com.netflix.config.DynamicURLConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.