Search in sources :

Example 21 with TopologyEvent

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

the class AssertingTopologyEventListener method dump.

public void dump() {
    StringBuffer ue = new StringBuffer();
    if (unexpectedEvents_.size() > 0) {
        for (Iterator<TopologyEvent> it = unexpectedEvents_.iterator(); it.hasNext(); ) {
            TopologyEvent topologyEvent = it.next();
            ue.append(topologyEvent + ", ");
        }
        unexpectedEvents_.iterator();
    }
    logger.info("dump: got " + events_.size() + " events, " + unexpectedEvents_.size() + " (details: " + ue + ") thereof unexpected. My list of expected events contains " + expectedEvents.size());
}
Also used : TopologyEvent(org.apache.sling.discovery.TopologyEvent)

Aggregations

TopologyEvent (org.apache.sling.discovery.TopologyEvent)21 TopologyEventListener (org.apache.sling.discovery.TopologyEventListener)10 Test (org.junit.Test)10 TopologyView (org.apache.sling.discovery.TopologyView)7 ArrayList (java.util.ArrayList)5 Type (org.apache.sling.discovery.TopologyEvent.Type)4 DiscoveryService (org.apache.sling.discovery.DiscoveryService)3 InstanceDescription (org.apache.sling.discovery.InstanceDescription)2 InitDelayingTopologyEventListener (org.apache.sling.discovery.commons.InitDelayingTopologyEventListener)2 DummyTopologyView (org.apache.sling.discovery.commons.providers.DummyTopologyView)2 HashMap (java.util.HashMap)1 Random (java.util.Random)1 Semaphore (java.util.concurrent.Semaphore)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1 Level (org.apache.log4j.Level)1 PersistenceException (org.apache.sling.api.resource.PersistenceException)1 ResourceResolver (org.apache.sling.api.resource.ResourceResolver)1 Scheduler (org.apache.sling.commons.scheduler.Scheduler)1 PropertyProvider (org.apache.sling.discovery.PropertyProvider)1