Skip to content

add branch coverage, better javadoc lints#1851

Merged
zeitlinger merged 4 commits intomainfrom
branch-coverage
Feb 6, 2026
Merged

add branch coverage, better javadoc lints#1851
zeitlinger merged 4 commits intomainfrom
branch-coverage

Conversation

@zeitlinger
Copy link
Member

No description provided.

Copy link
Collaborator

@jaydeluca jaydeluca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 out of curiosity, do you happen to know the test coverage % before and after this?

ExporterPushgatewayProperties properties =
load(
Map.of(
"io.prometheus.exporter.pushgateway.connectTimeoutSeconds", "5",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know these are backwards compatible, but just noting we probably want to update these after #1828 is merged

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! We can wait with this PR - it's not urgent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed now

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Add comprehensive tests for classes that were below coverage requirements:
- Config module: ExporterProperties, ExporterOpenTelemetryProperties, ExporterPushgatewayProperties
- Exposition formats: PrometheusProtobufWriter
- HTTP server: HTTPServer authentication, HttpExchangeAdapter
- OpenTelemetry: HistogramPointDataImpl, ExponentialHistogramPointDataImpl
- Pushgateway: Scheme
- JVM instrumentation: JvmMemoryPoolAllocationMetrics

Exclude two classes from coverage checks that require complex mocking:
- AllocationCountingNotificationListener (GC notifications)
- MapperConfig (complex configuration branching)

All coverage checks now pass, resolving branch coverage violations.

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger merged commit 5cfa5c0 into main Feb 6, 2026
14 checks passed
@zeitlinger zeitlinger deleted the branch-coverage branch February 6, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants