Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add branch coverage, better javadoc lints#1851

Merged
zeitlinger merged 4 commits intomainprometheus/client_java:mainfrom
branch-coverageprometheus/client_java:branch-coverageCopy head branch name to clipboard
Feb 6, 2026
Merged

add branch coverage, better javadoc lints#1851
zeitlinger merged 4 commits intomainprometheus/client_java:mainfrom
branch-coverageprometheus/client_java:branch-coverageCopy head branch name to clipboard

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

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.