pvillard31 opened a new pull request, #11420: URL: https://github.com/apache/nifi/pull/11420
# Summary `ConnectorAssetsIT.testCreateConnectorAndUploadAsset` intermittently fails with: ``` ConnectorAssetsIT.testCreateConnectorAndUploadAsset:199 expected: <false> but was: <true> ``` The test asserts that an unreferenced asset is removed immediately after `waitForConnectorState(STOPPED)`. Asset cleanup is asynchronous and may not have completed by the time the connector reaches STOPPED state, making the single-shot assertion inherently racy. # Changes - **`NiFiClientUtil`** — add `waitForAssetRemoved(connectorId, assetId)` utility that polls every 100 ms (matching the `waitForConnectorState` pattern) until the specified asset is absent from the connector's asset list. - **`ConnectorAssetsIT`** — replace the immediate one-shot `getAssets` / `assertFalse` check with a call to `waitForAssetRemoved`, tolerating the async cleanup delay. # Tracking ### Issue Tracking - [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI-16084) issue linked ### Pull Request Tracking - Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-16084` - Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-16084` ### Testing - Existing `testCreateConnectorAndUploadAsset` now reliably passes because it waits for the async asset cleanup instead of checking exactly once. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
