Skip to content

Commit 014d7c9

Browse files
committed
Unused methods removed
1 parent d286b7a commit 014d7c9

File tree

1 file changed

+0
-58
lines changed
  • jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/target_systems

1 file changed

+0
-58
lines changed

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/target_systems/MetricAssertions.java

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ class MetricAssertions {
2222

2323
private MetricAssertions() {}
2424

25-
static void assertGauge(Metric metric, String name, String description, String unit) {
26-
assertThat(metric.getName()).isEqualTo(name);
27-
assertThat(metric)
28-
.hasDescription(description)
29-
.hasUnit(unit)
30-
.isGauge()
31-
.hasDataPointsWithoutAttributes();
32-
}
33-
3425
static void assertSum(Metric metric, String name, String description, String unit) {
3526
assertSum(metric, name, description, unit, /* isMonotonic= */ true);
3627
}
@@ -73,37 +64,6 @@ static void assertSumWithAttributes(
7364
assertAttributedPoints(metric.getSum().getDataPointsList(), attributeGroupAssertions);
7465
}
7566

76-
@SafeVarargs
77-
static void assertSumWithAttributesMultiplePoints(
78-
Metric metric,
79-
String name,
80-
String description,
81-
String unit,
82-
boolean isMonotonic,
83-
Consumer<MapAssert<String, String>>... attributeGroupAssertions) {
84-
85-
assertThat(metric.getName()).isEqualTo(name);
86-
assertThat(metric).hasDescription(description).hasUnit(unit);
87-
88-
assertThat(metric.hasSum()).isTrue();
89-
assertThat(metric.getSum().getIsMonotonic()).isEqualTo(isMonotonic);
90-
assertAttributedMultiplePoints(metric.getSum().getDataPointsList(), attributeGroupAssertions);
91-
}
92-
93-
@SafeVarargs
94-
static void assertGaugeWithAttributes(
95-
Metric metric,
96-
String name,
97-
String description,
98-
String unit,
99-
Consumer<MapAssert<String, String>>... attributeGroupAssertions) {
100-
assertThat(metric.getName()).isEqualTo(name);
101-
102-
assertThat(metric).hasDescription(description).hasUnit(unit).isGauge();
103-
104-
assertAttributedPoints(metric.getGauge().getDataPointsList(), attributeGroupAssertions);
105-
}
106-
10767
@SuppressWarnings("unchecked")
10868
private static void assertAttributedPoints(
10969
List<NumberDataPoint> points,
@@ -122,22 +82,4 @@ private static void assertAttributedPoints(
12282
KeyValue::getKey, keyValue -> keyValue.getValue().getStringValue())))
12383
.satisfiesExactlyInAnyOrder(assertions);
12484
}
125-
126-
@SuppressWarnings("unchecked")
127-
private static void assertAttributedMultiplePoints(
128-
List<NumberDataPoint> points,
129-
Consumer<MapAssert<String, String>>... attributeGroupAssertions) {
130-
131-
points.stream()
132-
.map(NumberDataPoint::getAttributesList)
133-
.forEach(
134-
kvList -> {
135-
Map<String, String> kvMap =
136-
kvList.stream()
137-
.collect(
138-
Collectors.toMap(KeyValue::getKey, kv -> kv.getValue().getStringValue()));
139-
Arrays.stream(attributeGroupAssertions)
140-
.forEach(assertion -> assertion.accept(assertThat(kvMap)));
141-
});
142-
}
14385
}

0 commit comments

Comments
 (0)