[ 
https://issues.apache.org/jira/browse/NIFI-16453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-16453.
-----------------------------------
    Fix Version/s: 2.13.0
       Resolution: Fixed

> 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
>             Fix For: 2.13.0
>
>          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)

Reply via email to