Search in sources :

Example 1 with StreamRuleServiceImpl

use of org.graylog2.streams.StreamRuleServiceImpl in project graylog2-server by Graylog2.

the class StreamCatalogTest method setUp.

@Before
@SuppressForbidden("Using Executors.newSingleThreadExecutor() is okay in tests")
public void setUp() throws Exception {
    final MongoConnection mongoConnection = mongodb.mongoConnection();
    final ClusterEventBus clusterEventBus = new ClusterEventBus("cluster-event-bus", Executors.newSingleThreadExecutor());
    final StreamRuleService streamRuleService = new StreamRuleServiceImpl(mongoConnection, clusterEventBus);
    final StreamService streamService = new StreamServiceImpl(mongoConnection, streamRuleService, alertService, outputService, indexSetService, mongoIndexSetFactory, notificationService, entityOwnershipService, clusterEventBus, alarmCallbackConfigurationService);
    when(outputService.load("5adf239e4b900a0fdb4e5197")).thenReturn(OutputImpl.create("5adf239e4b900a0fdb4e5197", "Title", "Type", "admin", Collections.emptyMap(), new Date(1524654085L), null));
    facade = new StreamFacade(objectMapper, streamService, streamRuleService, alertService, alarmCallbackConfigurationService, legacyAlertConditionMigration, indexSetService, userService);
}
Also used : StreamRuleServiceImpl(org.graylog2.streams.StreamRuleServiceImpl) StreamService(org.graylog2.streams.StreamService) StreamRuleService(org.graylog2.streams.StreamRuleService) StreamServiceImpl(org.graylog2.streams.StreamServiceImpl) MongoConnection(org.graylog2.database.MongoConnection) ClusterEventBus(org.graylog2.events.ClusterEventBus) Date(java.util.Date) Before(org.junit.Before) SuppressForbidden(org.graylog2.shared.SuppressForbidden)

Aggregations

Date (java.util.Date)1 MongoConnection (org.graylog2.database.MongoConnection)1 ClusterEventBus (org.graylog2.events.ClusterEventBus)1 SuppressForbidden (org.graylog2.shared.SuppressForbidden)1 StreamRuleService (org.graylog2.streams.StreamRuleService)1 StreamRuleServiceImpl (org.graylog2.streams.StreamRuleServiceImpl)1 StreamService (org.graylog2.streams.StreamService)1 StreamServiceImpl (org.graylog2.streams.StreamServiceImpl)1 Before (org.junit.Before)1