But it is wrong, because the bean overrides the metric name (using @ConcurrentGauge(name = "cGaugedClass")) so the correct MetricID will be org.eclipse.microprofile.metrics.tck.metrics.cGaugedClass.ConcurrentGaugedClassBean, whereas the said line computes org.eclipse.microprofile.metrics.tck.metrics.ConcurrentGaugedClassBean.ConcurrentGaugedClassBean
This line computes the expected MetricID of a concurrent gauge created for
ConcurrentGaugedClassBean
's constructor: https://github.com/eclipse/microprofile-metrics/blob/2.3/tck/api/src/main/java/org/eclipse/microprofile/metrics/tck/metrics/ConcurrentGaugedClassBeanTest.java#L117But it is wrong, because the bean overrides the metric name (using
@ConcurrentGauge(name = "cGaugedClass")
) so the correct MetricID will beorg.eclipse.microprofile.metrics.tck.metrics.cGaugedClass.ConcurrentGaugedClassBean
, whereas the said line computesorg.eclipse.microprofile.metrics.tck.metrics.ConcurrentGaugedClassBean.ConcurrentGaugedClassBean
Therefore the logic to skip asserting its
max
value (https://github.com/eclipse/microprofile-metrics/blob/2.3/tck/api/src/main/java/org/eclipse/microprofile/metrics/tck/metrics/ConcurrentGaugedClassBeanTest.java#L120) will break and it will always be asserted that themax
value is 0, even though the comment above it says that themax
can sometimes be 1. This means that the test can intermittently fail if a new full minute starts between theConcurrentGaugedClassBean
instantiation and execution of the assertion on line 120, because in that case themax
value will be 1.