Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public Collector.MetricFamilySamples.Sample createSample(final String dropwizard

return defaultMetricSampleBuilder.createSample(
dropwizardName, nameSuffix,
Collections.<String>emptyList(),
Collections.<String>emptyList(),
additionalLabelNames,
additionalLabelValues,
value
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

public class CustomMappingSampleBuilderTest {
@Test(expected = IllegalArgumentException.class)
public void test_WHEN_EmptyConfig_THEN_ShouldReturnDefaultSample() {
public void test_WHEN_EmptyConfig_THEN_Fail() {
final CustomMappingSampleBuilder converter = new CustomMappingSampleBuilder(Collections.<MapperConfig>emptyList());
}

Expand All @@ -26,9 +26,9 @@ public void test_WHEN_NoMatches_THEN_ShouldReturnDefaultSample() {
);
final CustomMappingSampleBuilder converter = new CustomMappingSampleBuilder(mapperConfigs);
final Collector.MetricFamilySamples.Sample result = converter.createSample(
"app.okhttpclient.client.HttpClient.service.total", "", Collections.<String>emptyList(), Collections.<String>emptyList(), 0d);
"app.okhttpclient.client.HttpClient.service.total", "", Collections.singletonList("quantile"), Collections.singletonList("0.99"), 0d);

assertEquals(new Collector.MetricFamilySamples.Sample("app_okhttpclient_client_HttpClient_service_total", Collections.<String>emptyList(), Collections.<String>emptyList(), 0d), result);
assertEquals(new Collector.MetricFamilySamples.Sample("app_okhttpclient_client_HttpClient_service_total", Collections.singletonList("quantile"), Collections.singletonList("0.99"), 0d), result);
}

@Test
Expand Down Expand Up @@ -178,4 +178,4 @@ public void test_WHEN_AdditionalLabels_THEN_ShouldReturnCorrectSample() {

assertEquals(expectedResult, result);
}
}
}