Search in sources :

Example 6 with DiscoveryService

use of org.apache.sling.discovery.DiscoveryService in project sling by apache.

the class NoClusterDiscoveryServiceTest method testBasics.

@Test
public void testBasics() throws Exception {
    final DiscoveryService service = this.createService(true);
    assertNotNull(service.getTopology());
    assertTrue(service.getTopology().isCurrent());
    invoke(service, "deactivate");
    assertNull(service.getTopology());
}
Also used : DiscoveryService(org.apache.sling.discovery.DiscoveryService) Test(org.junit.Test)

Aggregations

DiscoveryService (org.apache.sling.discovery.DiscoveryService)6 Test (org.junit.Test)5 ArrayList (java.util.ArrayList)3 TopologyEvent (org.apache.sling.discovery.TopologyEvent)3 TopologyEventListener (org.apache.sling.discovery.TopologyEventListener)3 URL (java.net.URL)1 HashMap (java.util.HashMap)1 Set (java.util.Set)1 ClusterView (org.apache.sling.discovery.ClusterView)1 InstanceDescription (org.apache.sling.discovery.InstanceDescription)1 PropertyProvider (org.apache.sling.discovery.PropertyProvider)1 TopologyView (org.apache.sling.discovery.TopologyView)1 BaseTopologyView (org.apache.sling.discovery.commons.providers.BaseTopologyView)1 DefaultClusterView (org.apache.sling.discovery.commons.providers.DefaultClusterView)1 DefaultInstanceDescription (org.apache.sling.discovery.commons.providers.DefaultInstanceDescription)1 DummyTopologyView (org.apache.sling.discovery.commons.providers.DummyTopologyView)1 SlingSettingsService (org.apache.sling.settings.SlingSettingsService)1