File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
sdk-workflows/src/test/java/io/dapr/workflows Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -357,4 +357,23 @@ public void workflowRetryPolicyRetryTimeoutValueShouldHaveRightValueWhenBeingSet
357
357
358
358
assertEquals (Duration .ofSeconds (10 ), taskOptions .getRetryPolicy ().getRetryTimeout ());
359
359
}
360
+
361
+ @ Test
362
+ public void workflowRetryPolicyRetryThrowIllegalArgumentWhenNullRetryTimeoutIsSet () {
363
+ assertThrows (IllegalArgumentException .class , () ->
364
+ WorkflowTaskRetryPolicy .newBuilder ()
365
+ .setMaxNumberOfAttempts (1 )
366
+ .setFirstRetryInterval (Duration .ofSeconds (10 ))
367
+ .setRetryTimeout (null )
368
+ .build ());
369
+ }
370
+
371
+ @ Test
372
+ public void workflowRetryPolicyRetryThrowIllegalArgumentWhenRetryTimeoutIsLessThanMaxRetryInterval () {
373
+ assertThrows (IllegalArgumentException .class , () -> WorkflowTaskRetryPolicy .newBuilder ()
374
+ .setMaxNumberOfAttempts (1 )
375
+ .setFirstRetryInterval (Duration .ofSeconds (10 ))
376
+ .setRetryTimeout (Duration .ofSeconds (9 ))
377
+ .build ());
378
+ }
360
379
}
You can’t perform that action at this time.
0 commit comments