File tree 1 file changed +14
-0
lines changed
operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,20 @@ public boolean isLastAttempt() {
289
289
assertThat (retryInfo .isLastAttempt ()).isEqualTo (true );
290
290
}
291
291
292
+ @ Test
293
+ void setReScheduleToPostExecutionControlFromUpdateControl () {
294
+ testCustomResource .addFinalizer (DEFAULT_FINALIZER );
295
+
296
+ when (controller .createOrUpdateResource (eq (testCustomResource ), any ()))
297
+ .thenReturn (
298
+ UpdateControl .updateStatusSubResource (testCustomResource ).withReSchedule (1000l ));
299
+
300
+ PostExecutionControl control = eventDispatcher .handleExecution (
301
+ executionScopeWithCREvent (Watcher .Action .ADDED , testCustomResource ));
302
+
303
+ assertThat (control .getReScheduleDelay ().get ()).isEqualTo (1000l );
304
+ }
305
+
292
306
private void markForDeletion (CustomResource customResource ) {
293
307
customResource .getMetadata ().setDeletionTimestamp ("2019-8-10" );
294
308
}
You can’t perform that action at this time.
0 commit comments