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

Mark Payne updated NIFI-16183:
------------------------------
    Fix Version/s: 2.12.0
       Resolution: Fixed
           Status: Resolved  (was: Patch Available)

> Support a configurable timeout when stopping a Connector in the connector 
> mock test framework
> ---------------------------------------------------------------------------------------------
>
>                 Key: NIFI-16183
>                 URL: https://issues.apache.org/jira/browse/NIFI-16183
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Tools and Build
>            Reporter: Wojciech Kochman
>            Priority: Major
>             Fix For: 2.12.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The connector mock server stops a Connector with a single fixed 10-second 
> blocking wait ({{connectorNode.stop(flowEngine).get(10, TimeUnit.SECONDS)}}). 
> On slower shutdown paths (for example, a failed table still draining) that 
> wait can expire even though the Connector node retries its stop internally 
> and eventually reaches {{STOPPED}}, so an otherwise-passing test fails during 
> teardown with a {{TimeoutException}}.
> Proposed change: add a timeout-aware, active-polling stop to the connector 
> mock framework:
> * {{ConnectorTestRunner}}: add a {{default void stopConnector(Duration 
> timeout)}} overload that delegates to the no-arg method (backward compatible 
> for existing implementors).
> * {{StandardConnectorMockServer}}: initiate the asynchronous stop and then 
> poll the Connector state until it reports {{STOPPED}} within the supplied 
> timeout (default 60s budget, 250ms poll interval) instead of a single fixed 
> blocking wait, so polling rides through the node's internal stop retries; a 
> healthy stop still returns immediately.
> * {{StandardConnectorTestRunner}}: pass the timeout through to the mock 
> server.
> * {{CreateConnectorIT}}: add an integration test exercising the new overload 
> end-to-end.
> Pull request: https://github.com/apache/nifi/pull/11528



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to