Commit 98fa7ea
committed
NIFI-14472: Fix KubernetesConfigMapStateProviderTest flaky teardown on macOS
The test class was missing an @AfterEach to shut down the provider after each
test. Tests that called provider.initialize() but not provider.shutdown() left
the Kubernetes client's Netty event loop open. On macOS with Zulu JDK 21, the
GC collected the event loop before KubernetesMockServerExtension.afterEach()
ran, causing MockWebServer.await() to throw RejectedExecutionException:
'event executor terminated'
Fix: add @AfterEach shutdownProvider() to guarantee the Kubernetes client is
closed before the mock server extension tears down, ensuring deterministic
cleanup across all platforms and JVM implementations.
Co-authored-by: Rakesh Kumar Singh <rsky.rakesh@gmail.com>1 parent 67c2d4c commit 98fa7ea
1 file changed
Lines changed: 6 additions & 0 deletions
File tree
- nifi-framework-bundle/nifi-framework-extensions/nifi-framework-kubernetes-bundle/nifi-framework-kubernetes-state-provider/src/test/java/org/apache/nifi/kubernetes/state/provider
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
110 | 116 | | |
111 | 117 | | |
112 | 118 | | |
| |||
0 commit comments