Skip to content

Commit 94249d7

Browse files
committed
fixes
1 parent 94f1591 commit 94249d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/event/EventProcessorTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,18 @@ void schedulesRetryForMarReconciliationIntervalIfRetryExhausted() {
417417
verify(retryTimerEventSourceMock, times(1)).scheduleOnce((ResourceID) any(), anyLong());
418418
}
419419

420+
@Test
421+
void executionOfReconciliationNotStartIfProcessorStopped() {
422+
eventProcessor.handleEvent(prepareCREvent());
423+
// note that there could be race condition in this test, however it is very unlikely that it
424+
// will happen the stop is called after submission (that could be theoretically executed before
425+
// stop)
426+
eventProcessor.stop();
427+
428+
verify(reconciliationDispatcherMock, timeout(SEPARATE_EXECUTION_TIMEOUT).times(0))
429+
.handleExecution(any());
430+
}
431+
420432
private ResourceID eventAlreadyUnderProcessing() {
421433
when(reconciliationDispatcherMock.handleExecution(any()))
422434
.then(

0 commit comments

Comments
 (0)