[
https://issues.apache.org/jira/browse/NIFI-16453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132304#comment-18132304
]
ASF subversion and git services commented on NIFI-16453:
--------------------------------------------------------
Commit 59b3217e5faeb2b1904b60fbacd0b374c551702f in nifi's branch
refs/heads/main from Adela Jaworowska-Nowak
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=59b3217e5fa ]
NIFI-16453 Added component metric assertions to ConnectorTestRunner (#11831)
Describe null and empty results, and the difference between a summed lookup and
an exact attribute match. State that a runner without component metrics does
not support them.
> Add component metric assertions to ConnectorTestRunner
> ------------------------------------------------------
>
> Key: NIFI-16453
> URL: https://issues.apache.org/jira/browse/NIFI-16453
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Adela Jaworowska-Nowak
> Assignee: Adela Jaworowska-Nowak
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> {{ConnectorTestRunner}} currently cannot inspect counters and gauges emitted
> by processors in a Connector’s managed flow. {{StandardConnectorMockServer}}
> configures {{{}DefaultComponentMetricReporter{}}}, which discards all
> reported component metrics.
> Add an in-memory {{ComponentMetricReporter}} to the connector mock server and
> expose metric lookup methods through {{{}ConnectorTestRunner{}}}.
> The API should:
> * Retrieve cumulative counter values by component ID and metric name.
> * Optionally filter counters by metric attributes.
> * Retrieve recorded gauge values by component ID and metric name.
> * Optionally filter gauges by metric attributes.
> * Return only JDK types to avoid crossing the NAR classloader boundary with
> framework metric types.
> * Preserve compatibility for other {{ConnectorTestRunner}} implementations
> through default interface methods.
> This will allow connector integration tests to assert exact metric values
> instead of inferring metric emission from provenance events or other side
> effects.
> Acceptance Criteria
> * {{StandardConnectorMockServer}} records counters and gauges in memory.
> * Metrics are isolated by component instance ID.
> * Counter values are accumulated correctly.
> * Gauge values retain their recording order.
> * Attribute-based lookups are supported.
> * {{StandardConnectorTestRunner}} exposes and delegates metric lookup
> methods.
> * Unit and connector-mock integration tests verify the behavior.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)