Search in sources :

Example 1 with ViewSummaryService

use of org.graylog.plugins.views.search.views.ViewSummaryService in project graylog2-server by Graylog2.

the class SearchesCleanUpJobWithDBServicesTest method setup.

@Before
public void setup(MongoJackObjectMapperProvider mapperProvider) {
    DateTimeUtils.setCurrentMillisFixed(DateTime.parse("2018-07-03T13:37:42.000Z").getMillis());
    final ViewSummaryService viewService = new TestViewService(mongodb.mongoConnection(), mapperProvider);
    this.searchDbService = spy(new SearchDbService(mongodb.mongoConnection(), mapperProvider, dto -> new SearchRequirements(Collections.emptySet(), dto)));
    this.searchesCleanUpJob = new SearchesCleanUpJob(viewService, searchDbService, Duration.standardDays(4));
}
Also used : SearchRequirements(org.graylog.plugins.views.search.SearchRequirements) ViewSummaryService(org.graylog.plugins.views.search.views.ViewSummaryService) Before(org.junit.Before)

Aggregations

SearchRequirements (org.graylog.plugins.views.search.SearchRequirements)1 ViewSummaryService (org.graylog.plugins.views.search.views.ViewSummaryService)1 Before (org.junit.Before)1