Package com.netflix.config

Examples of com.netflix.config.ConcurrentCompositeConfiguration


        Assert.assertTrue("Allow all whitelist did not allow double event sync.", checkConsumeAllowed(new MySyncSub(), Double.class));
    }

    @Test
    public void testAllowSelectiveSyncWithWhitelist() throws Exception {
        ConcurrentCompositeConfiguration config = (ConcurrentCompositeConfiguration)ConfigurationManager.getConfigInstance();
        config.setOverrideProperty(SyncSubscribersGatekeeper.ALLOW_SYNC_SUBSCRIBERS, "true");
        config.setOverrideProperty(SyncSubscribersGatekeeper.SYNC_SUBSCRIBERS_WHITELIST_JSON,
                ALLOW_STRING_EVENT_JSON);
       
        Assert.assertTrue("Allow string whitelist did not allow string event sync.", checkConsumeAllowed(new MySyncSub(), String.class));
        Assert.assertFalse("Allow string whitelist allowed double event sync.", checkConsumeAllowed(new MySyncSub(), Double.class));
    }
View Full Code Here


        Assert.assertFalse("Allow string whitelist allowed double event sync.", checkConsumeAllowed(new MySyncSub(), Double.class));
    }

    @Test
    public void testAllowMultiSubs() throws Exception {
        ConcurrentCompositeConfiguration config = (ConcurrentCompositeConfiguration)ConfigurationManager.getConfigInstance();
        config.setOverrideProperty(SyncSubscribersGatekeeper.ALLOW_SYNC_SUBSCRIBERS, "true");
        config.setOverrideProperty(SyncSubscribersGatekeeper.SYNC_SUBSCRIBERS_WHITELIST_JSON, ALLOW_MULTI_SUBS_JSON);

        Assert.assertTrue("Allow multi whitelist did not allow string event sync on sub1.", checkConsumeAllowed(new MySyncSub(), String.class));
        Assert.assertTrue("Allow multi whitelist did not allow double event sync on sub2.", checkConsumeAllowed(new MySyncSub2(), Double.class));

        Assert.assertFalse("Allow multi whitelist allowed double event sync on sub1.", checkConsumeAllowed(new MySyncSub(), Double.class));
View Full Code Here

TOP

Related Classes of com.netflix.config.ConcurrentCompositeConfiguration

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.