Skip to content

Commit

Permalink
Bump org.apache.maven.plugins:maven-surefire-plugin from 2.12.4 to 3.…
Browse files Browse the repository at this point in the history
…5.1 (#1132)

* Bump org.apache.maven.plugins:maven-surefire-plugin from 2.12.4 to 3.5.1

Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 2.12.4 to 3.5.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-2.12.4...surefire-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix build

Signed-off-by: Gregor Zeitlinger <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Gregor Zeitlinger <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gregor Zeitlinger <[email protected]>
  • Loading branch information
dependabot[bot] and zeitlinger authored Oct 9, 2024
1 parent 9af5f28 commit 8d887a0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<version>3.5.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void testTotalStrippedFromName() {
}) {
Counter counter = Counter.builder().name(name).unit(Unit.SECONDS).build();
Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(counter.collect());
assertThat(TextFormat.printer().printToString(protobufData))
assertThat(TextFormat.printer().shortDebugString(protobufData))
.isEqualTo(
"name: \"my_counter_seconds_total\" type: COUNTER metric { counter { value: 0.0 } }");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void run() throws NoSuchFieldException, IllegalAccessException {
new PrometheusProtobufWriter().convert(histogram.collect());
String expectedWithMetadata =
"name: \"test\" type: HISTOGRAM metric { histogram { " + expected + " } }";
assertThat(TextFormat.printer().printToString(protobufData))
assertThat(TextFormat.printer().shortDebugString(protobufData))
.as("test \"" + name + "\" failed")
.isEqualTo(expectedWithMetadata);
}
Expand Down Expand Up @@ -941,7 +941,7 @@ public void testDefaults() throws IOException {

// protobuf
Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(snapshot);
assertThat(TextFormat.printer().printToString(protobufData)).isEqualTo(expectedProtobuf);
assertThat(TextFormat.printer().shortDebugString(protobufData)).isEqualTo(expectedProtobuf);

// text
ByteArrayOutputStream out = new ByteArrayOutputStream();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void testInfoStrippedFromName() {
Info info = Info.builder().name(name).labelNames(labelName).build();
info.addLabelValues("value");
Metrics.MetricFamily protobufData = new PrometheusProtobufWriter().convert(info.collect());
assertThat(TextFormat.printer().printToString(protobufData))
assertThat(TextFormat.printer().shortDebugString(protobufData))
.isEqualTo(
"name: \"jvm_runtime_info\" type: GAUGE metric { label { name: \"my_key\" value: \"value\" } gauge { value: 1.0 } }");
}
Expand Down
31 changes: 12 additions & 19 deletions prometheus-metrics-exposition-formats/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@
</properties>
</configuration>
</execution>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/generated/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand All @@ -97,25 +109,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/generated/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,7 @@ private void assertPrometheusTextWithoutCreated(String expected, MetricSnapshot
private void assertPrometheusProtobuf(String expected, MetricSnapshot snapshot) {
PrometheusProtobufWriter writer = new PrometheusProtobufWriter();
Metrics.MetricFamily protobufData = writer.convert(snapshot);
String actual = TextFormat.printer().printToString(protobufData);
String actual = TextFormat.printer().shortDebugString(protobufData);
assertThat(actual).isEqualTo(expected);
}
}

0 comments on commit 8d887a0

Please sign in to comment.