use of com.google.common.eventbus.DeadEvent in project graylog2-server by Graylog2.
the class ClusterEventPeriodicalTest method publishClusterEventSkipsDeadEvent.
@Test
@UsingDataSet(loadStrategy = LoadStrategyEnum.DELETE_ALL)
public void publishClusterEventSkipsDeadEvent() throws Exception {
DBCollection collection = mongoConnection.getDatabase().getCollection(ClusterEventPeriodical.COLLECTION_NAME);
DeadEvent event = new DeadEvent(clusterEventBus, new SimpleEvent("test"));
assertThat(collection.count()).isEqualTo(0L);
clusterEventPeriodical.publishClusterEvent(event);
verify(clusterEventBus, never()).post(any());
assertThat(collection.count()).isEqualTo(0L);
}
use of com.google.common.eventbus.DeadEvent in project graylog2-server by Graylog2.
the class DeadEventLoggingListenerTest method testHandleDeadEvent.
@Test
public void testHandleDeadEvent() {
final DeadEventLoggingListener listener = new DeadEventLoggingListener();
final DeadEvent event = new DeadEvent(this, new SimpleEvent("test"));
listener.handleDeadEvent(event);
}
Aggregations