Package io.airlift.discovery.client.testing

Examples of io.airlift.discovery.client.testing.InMemoryDiscoveryClient


    @Test
    public void testStartedWithServices()
            throws Exception
    {
        InMemoryDiscoveryClient discoveryClient = new InMemoryDiscoveryClient(nodeInfo);
        discoveryClient.addDiscoveredService(APPLE_1_SERVICE);
        discoveryClient.addDiscoveredService(APPLE_2_SERVICE);
        discoveryClient.addDiscoveredService(DIFFERENT_TYPE);
        discoveryClient.addDiscoveredService(DIFFERENT_POOL);

        CachingServiceSelector serviceSelector = new CachingServiceSelector("apple",
                new ServiceSelectorConfig().setPool("pool"),
                discoveryClient,
                executor);
View Full Code Here


    @BeforeMethod
    protected void setUp()
            throws Exception
    {
        nodeInfo = new NodeInfo(new NodeConfig().setEnvironment("test").setPool("pool"));
        discoveryClient = new InMemoryDiscoveryClient(nodeInfo, MAX_AGE);
        serviceAnnouncement = ServiceAnnouncement.serviceAnnouncement(serviceType.value()).addProperty("a", "apple").build();
        announcer = new Announcer(discoveryClient, ImmutableSet.of(serviceAnnouncement));
    }
View Full Code Here

TOP

Related Classes of io.airlift.discovery.client.testing.InMemoryDiscoveryClient

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.