Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f30f35e

Browse files
committedDec 14, 2020
test fix
1 parent 4850606 commit f30f35e

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed
 

‎operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/PostExecutionControl.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ public Optional<RuntimeException> getRuntimeException() {
5858

5959
@Override
6060
public String toString() {
61-
return "PostExecutionControl{" +
62-
"onlyFinalizerHandled=" + onlyFinalizerHandled +
63-
", updatedCustomResource=" + updatedCustomResource +
64-
", runtimeException=" + runtimeException +
65-
'}';
61+
return "PostExecutionControl{"
62+
+ "onlyFinalizerHandled="
63+
+ onlyFinalizerHandled
64+
+ ", updatedCustomResource="
65+
+ updatedCustomResource
66+
+ ", runtimeException="
67+
+ runtimeException
68+
+ '}';
6669
}
6770
}

‎operator-framework/src/test/java/io/javaoperatorsdk/operator/processing/DefaultEventHandlerTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class DefaultEventHandlerTest {
3434
private static final Logger log = LoggerFactory.getLogger(DefaultEventHandlerTest.class);
3535

3636
public static final int FAKE_CONTROLLER_EXECUTION_DURATION = 250;
37-
public static final int SEPARATE_EXECUTION_TIMEOUT = 150;
37+
public static final int SEPARATE_EXECUTION_TIMEOUT = 450;
3838
private EventDispatcher eventDispatcherMock = mock(EventDispatcher.class);
3939
private CustomResourceCache customResourceCache = new CustomResourceCache();
4040
private DefaultEventSourceManager defaultEventSourceManagerMock =
@@ -175,24 +175,24 @@ public void successfulExecutionResetsTheRetry() {
175175
PostExecutionControl defaultDispatchControl = PostExecutionControl.defaultDispatch();
176176

177177
when(eventDispatcherMock.handleExecution(any()))
178-
.thenReturn(postExecutionControlWithException)
179-
.thenReturn(defaultDispatchControl);
178+
.thenReturn(postExecutionControlWithException)
179+
.thenReturn(defaultDispatchControl);
180180

181181
ArgumentCaptor<ExecutionScope> executionScopeArgumentCaptor =
182-
ArgumentCaptor.forClass(ExecutionScope.class);
182+
ArgumentCaptor.forClass(ExecutionScope.class);
183183

184184
defaultEventHandlerWithRetry.handleEvent(event);
185185

186186
verify(eventDispatcherMock, timeout(SEPARATE_EXECUTION_TIMEOUT).times(1))
187-
.handleExecution(any());
187+
.handleExecution(any());
188188
defaultEventHandlerWithRetry.handleEvent(event);
189189

190190
verify(eventDispatcherMock, timeout(SEPARATE_EXECUTION_TIMEOUT).times(2))
191-
.handleExecution(any());
191+
.handleExecution(any());
192192
defaultEventHandlerWithRetry.handleEvent(event);
193193

194194
verify(eventDispatcherMock, timeout(SEPARATE_EXECUTION_TIMEOUT).times(3))
195-
.handleExecution(executionScopeArgumentCaptor.capture());
195+
.handleExecution(executionScopeArgumentCaptor.capture());
196196
log.info("Finished successfulExecutionResetsTheRetry");
197197

198198
List<ExecutionScope> executionScopes = executionScopeArgumentCaptor.getAllValues();

0 commit comments

Comments
 (0)
Please sign in to comment.