use of org.apache.hadoop.ozone.recon.scm.ReconPipelineFactory.ReconPipelineProvider in project ozone by apache.
the class TestReconPipelineManager method testStubbedReconPipelineFactory.
@Test
public void testStubbedReconPipelineFactory() throws IOException {
NodeManager nodeManagerMock = mock(NodeManager.class);
ReconPipelineManager reconPipelineManager = ReconPipelineManager.newReconPipelineManager(conf, nodeManagerMock, ReconSCMDBDefinition.PIPELINES.getTable(store), new EventQueue(), scmhaManager, scmContext);
PipelineFactory pipelineFactory = reconPipelineManager.getPipelineFactory();
assertTrue(pipelineFactory instanceof ReconPipelineFactory);
ReconPipelineFactory reconPipelineFactory = (ReconPipelineFactory) pipelineFactory;
assertTrue(reconPipelineFactory.getProviders().isEmpty());
for (ReplicationType type : reconPipelineFactory.getProviders().keySet()) {
PipelineProvider pipelineProvider = reconPipelineFactory.getProviders().get(type);
assertTrue(pipelineProvider instanceof ReconPipelineProvider);
}
}
Aggregations