Search in sources :

Example 1 with MongoDbRuleService

use of org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbRuleService in project graylog2-server by Graylog2.

the class PipelineRuleFacadeTest method setUp.

@Before
@SuppressForbidden("Using Executors.newSingleThreadExecutor() is okay in tests")
public void setUp() throws Exception {
    final ClusterEventBus clusterEventBus = new ClusterEventBus("cluster-event-bus", Executors.newSingleThreadExecutor());
    ruleService = new MongoDbRuleService(mongodb.mongoConnection(), new MongoJackObjectMapperProvider(objectMapper), clusterEventBus);
    facade = new PipelineRuleFacade(objectMapper, ruleService);
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) MongoDbRuleService(org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbRuleService) ClusterEventBus(org.graylog2.events.ClusterEventBus) Before(org.junit.Before) SuppressForbidden(org.graylog2.shared.SuppressForbidden)

Aggregations

MongoDbRuleService (org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbRuleService)1 MongoJackObjectMapperProvider (org.graylog2.bindings.providers.MongoJackObjectMapperProvider)1 ClusterEventBus (org.graylog2.events.ClusterEventBus)1 SuppressForbidden (org.graylog2.shared.SuppressForbidden)1 Before (org.junit.Before)1