Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 authored and rickie committed Dec 22, 2024
1 parent e5e7040 commit e8ff396
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4511,7 +4511,7 @@
testCase.systemProperties.keySet().forEach(System::clearProperty);
--- a/prometheus-metrics-exporter-opentelemetry/src/test/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScopeTest.java
+++ b/prometheus-metrics-exporter-opentelemetry/src/test/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScopeTest.java
@@ -1,40 +1,40 @@
@@ -1,38 +1,38 @@
package io.prometheus.metrics.exporter.opentelemetry;

-import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
Expand All @@ -4523,8 +4523,6 @@
-class PrometheusInstrumentationScopeTest {
+final class PrometheusInstrumentationScopeTest {

// XXX: Introduce support for rewriting `assertThatThrownBy#havingRootCause()`.
@SuppressWarnings("AssertThatThrownBy")
@Test
void loadInstrumentationScopeInfo() {
- assertThatExceptionOfType(IllegalStateException.class)
Expand Down
30 changes: 1 addition & 29 deletions integration-tests/prometheus-java-client-init.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
<automatic.module.name>--module-name-need-to-be-overriden--</automatic.module.name>
<junit-jupiter.version>5.11.3</junit-jupiter.version>
<otel.instrumentation.version>2.10.0-alpha</otel.instrumentation.version>
- <java.version>8</java.version>
+ <java.version>11</java.version>
<jacoco.line-coverage>0.70</jacoco.line-coverage>
<checkstyle.skip>false</checkstyle.skip>
<coverage.skip>false</coverage.skip>
@@ -128,7 +128,6 @@
<dependency>
<groupId>com.google.guava</groupId>
Expand All @@ -17,15 +8,7 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -360,7 +359,6 @@
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Xlint:all,-serial,-processing,-options</arg>
- <arg>${warnings}</arg>
<arg>--should-stop=ifError=FLOW</arg>
<arg>-XDcompilePolicy=simple</arg>
<arg>
@@ -370,13 +368,24 @@
@@ -370,13 +369,24 @@
-Xep:LongDoubleConversion:OFF
-Xep:StringSplitter:OFF
-XepExcludedPaths:.*/generated/.*
Expand All @@ -51,17 +34,6 @@
</path>
<!-- Other annotation processors go here.

--- a/prometheus-metrics-exporter-opentelemetry/src/test/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScopeTest.java
+++ b/prometheus-metrics-exporter-opentelemetry/src/test/java/io/prometheus/metrics/exporter/opentelemetry/PrometheusInstrumentationScopeTest.java
@@ -7,6 +7,8 @@ import org.junit.jupiter.api.Test;

class PrometheusInstrumentationScopeTest {

+ // XXX: Introduce support for rewriting `assertThatThrownBy#havingRootCause()`.
+ @SuppressWarnings("AssertThatThrownBy")
@Test
void loadInstrumentationScopeInfo() {
assertThatExceptionOfType(IllegalStateException.class)
--- a/prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MetricNameFilter.java
+++ b/prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/MetricNameFilter.java
@@ -8,6 +8,8 @@ import java.util.Collection;
Expand Down
6 changes: 1 addition & 5 deletions integration-tests/prometheus-java-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ test_name="$(basename "${0}" .sh)"
project='prometheus-java-client'
repository='https://github.com/prometheus/client_java.git'
revision='v1.3.5'
additional_build_flags=''
additional_build_flags='-Djava.version=11 -Dwarnings='
additional_source_directories=''
# XXX: Minimize the diff by including
# `-XepOpt:Slf4jLoggerDeclaration:CanonicalStaticLoggerName=logger` once such
# flags are supported in patch mode. See
# https://github.com/google/error-prone/pull/4699.
shared_error_prone_flags=''
patch_error_prone_flags=''
validation_error_prone_flags=''
Expand Down

0 comments on commit e8ff396

Please sign in to comment.