Skip to content

Commit 01a4080

Browse files
committed
fix lint
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
1 parent add7c1e commit 01a4080

1 file changed

Lines changed: 31 additions & 24 deletions

File tree

prometheus-metrics-exposition-textformats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatsTest.java

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,14 +2035,14 @@ void testClassicGaugeHistogramCountAndSum() throws IOException {
20352035
void testClassicHistogramWithDots() throws IOException {
20362036
String openMetricsText =
20372037
"""
2038-
# TYPE U__my_2e_request_2e_duration_2e_seconds histogram
2039-
# UNIT U__my_2e_request_2e_duration_2e_seconds seconds
2040-
# HELP U__my_2e_request_2e_duration_2e_seconds Request duration in seconds
2041-
U__my_2e_request_2e_duration_2e_seconds_bucket{U__http_2e_path="/hello",le="+Inf"} 130 # {U__some_2e_exemplar_2e_key="some value"} 3.0 1690298864.383
2042-
U__my_2e_request_2e_duration_2e_seconds_count{U__http_2e_path="/hello"} 130
2043-
U__my_2e_request_2e_duration_2e_seconds_sum{U__http_2e_path="/hello"} 0.01
2044-
# EOF
2045-
""";
2038+
# TYPE U__my_2e_request_2e_duration_2e_seconds histogram
2039+
# UNIT U__my_2e_request_2e_duration_2e_seconds seconds
2040+
# HELP U__my_2e_request_2e_duration_2e_seconds Request duration in seconds
2041+
U__my_2e_request_2e_duration_2e_seconds_bucket{U__http_2e_path="/hello",le="+Inf"} 130 # {U__some_2e_exemplar_2e_key="some value"} 3.0 1690298864.383
2042+
U__my_2e_request_2e_duration_2e_seconds_count{U__http_2e_path="/hello"} 130
2043+
U__my_2e_request_2e_duration_2e_seconds_sum{U__http_2e_path="/hello"} 0.01
2044+
# EOF
2045+
""";
20462046
String openMetricsTextWithExemplarsOnAllTimeSeries =
20472047
"# TYPE my_request_duration_seconds histogram\n"
20482048
+ "# UNIT my_request_duration_seconds seconds\n"
@@ -2456,14 +2456,14 @@ void testNativeHistogramMinimal() throws IOException {
24562456
void testNativeHistogramWithDots() throws IOException {
24572457
String openMetricsText =
24582458
"""
2459-
# TYPE U__my_2e_request_2e_duration_2e_seconds histogram
2460-
# UNIT U__my_2e_request_2e_duration_2e_seconds seconds
2461-
# HELP U__my_2e_request_2e_duration_2e_seconds Request duration in seconds
2462-
U__my_2e_request_2e_duration_2e_seconds_bucket{U__http_2e_path="/hello",le="+Inf"} 4 # {U__some_2e_exemplar_2e_key="some value"} 3.0 1690298864.383
2463-
U__my_2e_request_2e_duration_2e_seconds_count{U__http_2e_path="/hello"} 4
2464-
U__my_2e_request_2e_duration_2e_seconds_sum{U__http_2e_path="/hello"} 3.2
2465-
# EOF
2466-
""";
2459+
# TYPE U__my_2e_request_2e_duration_2e_seconds histogram
2460+
# UNIT U__my_2e_request_2e_duration_2e_seconds seconds
2461+
# HELP U__my_2e_request_2e_duration_2e_seconds Request duration in seconds
2462+
U__my_2e_request_2e_duration_2e_seconds_bucket{U__http_2e_path="/hello",le="+Inf"} 4 # {U__some_2e_exemplar_2e_key="some value"} 3.0 1690298864.383
2463+
U__my_2e_request_2e_duration_2e_seconds_count{U__http_2e_path="/hello"} 4
2464+
U__my_2e_request_2e_duration_2e_seconds_sum{U__http_2e_path="/hello"} 3.2
2465+
# EOF
2466+
""";
24672467
String openMetricsTextWithExemplarsOnAllTimeSeries =
24682468
"# TYPE my_request_duration_seconds histogram\n"
24692469
+ "# UNIT my_request_duration_seconds seconds\n"
@@ -2934,12 +2934,19 @@ void testLabelValueEscape() throws IOException {
29342934

29352935
@ParameterizedTest
29362936
@CsvSource({
2937-
"'application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited', 'application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited; escaping=underscores'",
2937+
"'application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited',"
2938+
+ " 'application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily;"
2939+
+ " encoding=delimited; escaping=underscores'",
29382940
"'text/plain;version=0.0.4', 'text/plain; version=0.0.4; charset=utf-8; escaping=underscores'",
2939-
"'application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited; escaping=allow-utf-8', 'application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited; escaping=allow-utf-8'",
2940-
"'application/openmetrics-text', 'application/openmetrics-text; version=1.0.0; charset=utf-8; escaping=underscores'",
2941-
"'application/openmetrics-text;version=0.0.1; escaping=underscores', 'application/openmetrics-text; version=1.0.0; charset=utf-8; escaping=underscores'",
2942-
"'text/plain;version=0.0.4; escaping=allow-utf-8', 'text/plain; version=0.0.4; charset=utf-8; escaping=allow-utf-8'"
2941+
"'application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;"
2942+
+ " escaping=allow-utf-8', 'application/vnd.google.protobuf;"
2943+
+ " proto=io.prometheus.client.MetricFamily; encoding=delimited; escaping=allow-utf-8'",
2944+
"'application/openmetrics-text', 'application/openmetrics-text; version=1.0.0; charset=utf-8;"
2945+
+ " escaping=underscores'",
2946+
"'application/openmetrics-text;version=0.0.1; escaping=underscores',"
2947+
+ " 'application/openmetrics-text; version=1.0.0; charset=utf-8; escaping=underscores'",
2948+
"'text/plain;version=0.0.4; escaping=allow-utf-8', 'text/plain; version=0.0.4; charset=utf-8;"
2949+
+ " escaping=allow-utf-8'"
29432950
})
29442951
public void testFindWriter(String acceptHeaderValue, String expectedFmt) {
29452952
ExpositionFormats expositionFormats = ExpositionFormats.init();
@@ -2968,9 +2975,9 @@ void testWrite() throws IOException {
29682975

29692976
String expected =
29702977
"""
2971-
# TYPE foo_metric untyped
2972-
foo_metric 1.234
2973-
""";
2978+
# TYPE foo_metric untyped
2979+
foo_metric 1.234
2980+
""";
29742981

29752982
assertThat(new String(out, UTF_8)).hasToString(expected);
29762983
}

0 commit comments

Comments
 (0)