Search in sources :

Example 1 with PaginatedGrokPatternService

use of org.graylog2.grok.PaginatedGrokPatternService in project graylog2-server by Graylog2.

the class GrokResourceTest method setUp.

@Before
@SuppressForbidden("Using Executors.newSingleThreadExecutor() is okay in tests")
public void setUp() {
    paginatedGrokPatternService = mock(PaginatedGrokPatternService.class);
    final ClusterEventBus clusterBus = new ClusterEventBus("cluster-event-bus", Executors.newSingleThreadExecutor());
    grokPatternService = new InMemoryGrokPatternService(clusterBus);
    subscriber = new GrokPatternsChangedEventSubscriber();
    clusterBus.registerClusterEventSubscriber(subscriber);
    grokResource = new PermittedTestResource(grokPatternService, paginatedGrokPatternService);
}
Also used : InMemoryGrokPatternService(org.graylog2.grok.InMemoryGrokPatternService) PaginatedGrokPatternService(org.graylog2.grok.PaginatedGrokPatternService) ClusterEventBus(org.graylog2.events.ClusterEventBus) Before(org.junit.Before) SuppressForbidden(org.graylog2.shared.SuppressForbidden)

Aggregations

ClusterEventBus (org.graylog2.events.ClusterEventBus)1 InMemoryGrokPatternService (org.graylog2.grok.InMemoryGrokPatternService)1 PaginatedGrokPatternService (org.graylog2.grok.PaginatedGrokPatternService)1 SuppressForbidden (org.graylog2.shared.SuppressForbidden)1 Before (org.junit.Before)1