use of org.graylog2.cluster.ClusterConfigServiceImpl in project graylog2-server by Graylog2.
the class V20161215163900_MoveIndexSetDefaultConfigTest method setUp.
@Before
public void setUp() throws Exception {
this.clusterConfigService = spy(new ClusterConfigServiceImpl(objectMapperProvider, fongoRule.getConnection(), nodeId, new ChainingClassLoader(getClass().getClassLoader()), new ClusterEventBus()));
this.collection = fongoRule.getDatabase().getCollection("index_sets");
this.migration = new V20161215163900_MoveIndexSetDefaultConfig(fongoRule.getConnection(), clusterConfigService);
}
use of org.graylog2.cluster.ClusterConfigServiceImpl in project graylog2-server by Graylog2.
the class ClusterConfigServiceImplTest method setUpService.
@Before
public void setUpService() throws Exception {
DateTimeUtils.setCurrentMillisFixed(TIME.getMillis());
this.mongoConnection = mongoRule.getMongoConnection();
MongoJackObjectMapperProvider provider = new MongoJackObjectMapperProvider(objectMapper);
when(nodeId.toString()).thenReturn("ID");
this.clusterConfigService = new ClusterConfigServiceImpl(provider, mongoRule.getMongoConnection(), nodeId, new ChainingClassLoader(getClass().getClassLoader()), clusterEventBus);
}
use of org.graylog2.cluster.ClusterConfigServiceImpl in project graylog2-server by Graylog2.
the class V20170110150100_FixAlertConditionsMigrationTest method setUp.
@Before
public void setUp() throws Exception {
this.clusterConfigService = spy(new ClusterConfigServiceImpl(objectMapperProvider, fongoRule.getConnection(), nodeId, new ChainingClassLoader(getClass().getClassLoader()), new ClusterEventBus()));
final MongoConnection mongoConnection = spy(fongoRule.getConnection());
final MongoDatabase mongoDatabase = spy(fongoRule.getDatabase());
when(mongoConnection.getMongoDatabase()).thenReturn(mongoDatabase);
this.collection = spy(mongoDatabase.getCollection("streams"));
when(mongoDatabase.getCollection("streams")).thenReturn(collection);
this.migration = new V20170110150100_FixAlertConditionsMigration(mongoConnection, clusterConfigService);
}
use of org.graylog2.cluster.ClusterConfigServiceImpl in project graylog2-server by Graylog2.
the class MongoIndexSetServiceTest method setUp.
@Before
public void setUp() throws Exception {
clusterEventBus = new ClusterEventBus();
clusterConfigService = new ClusterConfigServiceImpl(objectMapperProvider, mongoRule.getMongoConnection(), nodeId, new ChainingClassLoader(getClass().getClassLoader()), clusterEventBus);
indexSetService = new MongoIndexSetService(mongoRule.getMongoConnection(), objectMapperProvider, streamService, clusterConfigService, clusterEventBus);
}
Aggregations