use of org.apache.drill.exec.coord.store.TransientStoreEvent in project drill by apache.
the class TestEventDispatcher method testDispatcherPropagatesEvents.
@Test
public void testDispatcherPropagatesEvents() throws Exception {
final PathChildrenCacheEvent.Type[] types = new PathChildrenCacheEvent.Type[] { PathChildrenCacheEvent.Type.CHILD_ADDED, PathChildrenCacheEvent.Type.CHILD_REMOVED, PathChildrenCacheEvent.Type.CHILD_UPDATED };
for (final PathChildrenCacheEvent.Type type : types) {
dispatcher.childEvent(null, new PathChildrenCacheEvent(type, child));
final TransientStoreEvent event = TransientStoreEvent.of(EventDispatcher.MAPPINGS.get(type), key, value);
Mockito.verify(store).fireListeners(event);
}
Assert.assertEquals("Number of event types that dispatcher can handle is different", types.length, EventDispatcher.MAPPINGS.size());
}
Aggregations