Skip to content

Commit 5d662b8

Browse files
committed
fix unit test
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent 80495e1 commit 5d662b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/event/source/controller/ControllerEventSourceTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ public TestController(
165165
reconciler,
166166
new TestConfiguration(true, onAddFilter, onUpdateFilter, genericFilter),
167167
MockKubernetesClient.client(TestCustomResource.class));
168+
169+
when(eventSourceManager.getControllerEventSource())
170+
.thenReturn(mock(ControllerEventSource.class));
168171
}
169172

170173
public TestController(boolean generationAware) {
@@ -176,6 +179,9 @@ public TestController(boolean generationAware) {
176179

177180
@Override
178181
public EventSourceManager<TestCustomResource> getEventSourceManager() {
182+
if (eventSourceManager == null) {
183+
return super.getEventSourceManager();
184+
}
179185
return eventSourceManager;
180186
}
181187

0 commit comments

Comments
 (0)