exceptionfactory commented on PR #11223:
URL: https://github.com/apache/nifi/pull/11223#issuecomment-4409839665

   > [claude-opus-4.7] Thanks for the review @exceptionfactory. The Kubernetes 
change addresses a unit-test flake, not a system test. 
`KubernetesConfigMapStateProviderTest`'s `@AfterEach` calls 
`provider.shutdown()`, and when a `@BeforeEach` throws (or initialization is 
skipped) `shutdown()` NPEs because `kubernetesClient` is null. The NPE then 
masks the real failure cause. Observed on PR #11211 in [actions run 
25513810851](https://github.com/apache/nifi/actions/runs/25513810851):
   > 
   > ``` java.lang.NullPointerException: Cannot invoke 
"io.fabric8.kubernetes.client.KubernetesClient.close()" because 
"this.kubernetesClient" is null at 
KubernetesConfigMapStateProvider.shutdown(KubernetesConfigMapStateProvider.java:144)
 at 
KubernetesConfigMapStateProviderTest.shutdownProvider(KubernetesConfigMapStateProviderTest.java:113)
 ```
   > 
   > The fix is just a null check in `shutdown()` plus a unit test verifying it.
   > 
   > Happy to split it out into a separate PR if you'd prefer the lifecycle PR 
stays narrowly scoped — let me know.
   
   Thanks for the background reference, keeping it in this PR sounds good.


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