Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jmx-scraper] wildfly refactor assertions #1587

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

SylvainJuge
Copy link
Contributor

@SylvainJuge SylvainJuge commented Dec 10, 2024

Description:

Migrates Wildfly integration test to use the new assertion framework.

Bonus: fixes a few bugs in the yaml definition and hbase tests that were not covered previously 🎉

Part of #1573

  • prevent adding duplicate metric assertions
  • fix wildfly datasource metrics
  • migrate wildfly assertions

@@ -46,22 +46,6 @@ protected MetricsVerifier createMetricsVerifier() {
.hasDataPointsWithAttributes(
attributeGroup(attribute("state", "dead")),
attributeGroup(attribute("state", "live"))))
.add(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[for reviewer] duplicated test assertion for this metric.

@@ -63,6 +63,9 @@ public MetricsVerifier disableStrictMode() {
*/
@CanIgnoreReturnValue
public MetricsVerifier add(String metricName, Consumer<MetricAssert> assertion) {
if (assertions.containsKey(metricName)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[for reviewer] this ensures that we don't have duplicated assertions for the same metric.

prefix: wildfly.jdbc.
mapping:
ActiveCount:
metric: &metric connection.open
type: updowncounter
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[for reviewer] this was actually a mistake made when creating the yaml mapping.

@trask trask merged commit f9774f3 into open-telemetry:main Dec 10, 2024
14 checks passed
@SylvainJuge SylvainJuge deleted the wildfly-refactor-test branch December 11, 2024 08:50
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.

4 participants