-
Notifications
You must be signed in to change notification settings - Fork 63
baseline metrics in CircuitBreakerTelemetryTest #655
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
Conversation
The call to `baselineMetrics()` after creating the `TelemetryMetricGetter` was missing in this test. Funnily enough, the MP Metrics counterpart of this test (`CircuitBreakerMetricTest`) baselines metrics correctly.
Can one of the admins verify this patch? |
One TCK test remains excluded, because it has a bug [1]. [1] microprofile/microprofile-fault-tolerance#655
@eclipse-microprofile-bot test this please |
This requires propagating the "metrics enabled at build time" information through the `OpenTelemetrySdkBuildItem`. I took the liberty to also add the tracing and logging build time enablement information, even though I have no use for it at the moment. One TCK test remains excluded, because it has a bug [1][2]. [1] microprofile/microprofile-fault-tolerance#656 [2] microprofile/microprofile-fault-tolerance#655
There is not a lot of places in the MicroProfile Fault Tolerance TCK that require executing some logic before each `@Test` method, but all of them use `@BeforeMethod`. The only exception is `CircuitBreakerMetricTest` and `CircuitBreakerTelemetryTest`, which use `@BeforeTest`. However, `@BeforeTest` in TestNG is nothing like `@BeforeTest` in JUnit -- in TestNG, it means before the `<test>` tag in `testng.xml`. This commit replaces the usage of `@BeforeTest` with `@BeforeMethod`. If the method was supposed to be called once before the test class, the proper annotation would be `@BeforeClass`, but this test class has exactly one `@Test` method, so it doesn't matter. If it had multiple, `@BeforeMethod` would actually be more appropriate, because it brings the circuit breaker into the initial (closed) state, regardless of the state it is currently in.
Added an extra commit that replaces |
Thanks, I think this makes sense. I agree the cleanup in this method probably isn't necessary since the test class only has one test method, but the current behaviour (where the |
I'll merge this on Monday unless any objections are raised and then we can do a service release. |
The call to
baselineMetrics()
after creating theTelemetryMetricGetter
was missing in this test. Funnily enough, the MP Metrics counterpart of this test (CircuitBreakerMetricTest
) baselines metrics correctly.Fixes #656