abij opened a new pull request, #11673:
URL: https://github.com/apache/nifi/pull/11673

   # Summary
   
   [NIFI-16339](https://issues.apache.org/jira/browse/NIFI-16339)
   
   Two unit/system tests contain timing-sensitive race conditions that 
intermittently fail CI on unrelated pull requests, forcing maintainers to 
re-run jobs. This PR makes both tests tolerant of valid asynchronous state 
transitions without changing any production behavior.
   
   ### 
`TestStandardProcessScheduler.validateNeverEnablingServiceCanStillBeDisabled`
   
   `disableControllerService(...)` is asynchronous. When disabling a controller 
service whose `@OnEnabled` is still blocked, the node may already have reached 
`DISABLED` by the time the test inspects the state, rather than being observed 
in the intermediate `DISABLING` state. Both are valid outcomes, so the strict 
equality assertion is timing-dependent and fails on fast/loaded runners 
(observed on `Windows Zulu JDK 21`):
   
   ```
   
TestStandardProcessScheduler.validateNeverEnablingServiceCanStillBeDisabled:508
   expected: <DISABLING> but was: <DISABLED>
   ```
   
   The assertion now accepts either `DISABLING` or `DISABLED`.
   
   ### `PythonNarDeletionDuringInitIT.testNarReuploadAfterForceDeleteDuringInit`
   
   After a re-uploaded NAR reaches `INSTALLED`, processor-type discovery can 
lag briefly, so a single immediate lookup can return `null` and fail 
`assertNotNull`. The test now polls for the processor type (200 ms interval, 30 
s monotonic deadline) before asserting.
   
   ### Out of scope
   
   Several clustered/system tests intermittently hit their 5-minute `@Timeout` 
during node startup on CI (worst on `ubuntu-24.04 Java 25`). The failing test 
rotates run-to-run (e.g. `AutoResumeStateClusteredIT`, 
`OffloadContentClaimTruncationIT`, `FlowSynchronizationIT`, 
`ClusteredConnectorTroubleshootingIT`, `ControllerServiceStateIT`). Because 
there is no single root cause in test logic (only shared timeout pressure), 
these are tracked separately as CI/runner performance flakiness and are not 
addressed here.
   
   # Tracking
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI-16339) 
issue created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-00000`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [x] Pull Request based on current revision of the `main` branch
   - [x] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [ ] Build completed using `./mvnw clean install -P contrib-check`
     - [ ] JDK 21
     - [ ] JDK 25
   
   ### Licensing
   
   - [x] New dependencies are compatible with the [Apache License 
2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html) — no new dependencies
   
   ### Documentation
   
   - [x] Documentation not required — test-only change
   
   


-- 
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]

Reply via email to