use of org.apache.jackrabbit.oak.spi.whiteboard.DefaultWhiteboard in project jackrabbit-oak by apache.
the class MetricsExporterFixtureProviderTest method checkCorrectPushGatewayInit.
@Test
public void checkCorrectPushGatewayInit() throws Exception {
OptionParser parser = new OptionParser();
DataStoreOptions dataStoreOptions = new DataStoreOptions(parser);
OptionSet option = parser.parse("--export-metrics", "pushgateway;localhost:9091;key1=value1,key2=value2");
dataStoreOptions.configure(option);
MetricsExporterFixture metricsExporterFixture = MetricsExporterFixtureProvider.create(dataStoreOptions, new DefaultWhiteboard());
assertEquals("pushgateway", metricsExporterFixture.getExporterType().name());
Object metricsExporter = metricsExporterFixture.getMetricsExporter();
assertTrue(metricsExporter instanceof PushGateway);
}
Aggregations