24
24
25
25
import io .temporal .api .enums .v1 .ScheduleOverlapPolicy ;
26
26
import io .temporal .client .WorkflowOptions ;
27
+ import io .temporal .common .RetryOptions ;
27
28
import io .temporal .common .converter .EncodedValues ;
28
29
import io .temporal .common .interceptors .ScheduleClientInterceptor ;
29
30
import io .temporal .testing .internal .SDKTestWorkflowRule ;
@@ -301,10 +302,12 @@ public void describeSchedules() {
301
302
.setMemo (Collections .singletonMap ("memokey2" , "memoval2" ))
302
303
.build ();
303
304
String scheduleId = UUID .randomUUID ().toString ();
305
+ RetryOptions retryOptions = RetryOptions .newBuilder ().setMaximumAttempts (1 ).build ();
304
306
WorkflowOptions wfOptions =
305
307
WorkflowOptions .newBuilder ()
306
308
.setWorkflowId ("test" )
307
309
.setTaskQueue (testWorkflowRule .getTaskQueue ())
310
+ .setRetryOptions (retryOptions )
308
311
.setMemo (Collections .singletonMap ("memokey1" , "memoval1" ))
309
312
.build ();
310
313
@@ -360,7 +363,7 @@ public void describeSchedules() {
360
363
//
361
364
Assert .assertEquals (scheduleId , description .getId ());
362
365
Assert .assertEquals ("memoval2" , description .getMemo ("memokey2" , String .class ));
363
- //
366
+ // Assert action
364
367
Assert .assertEquals (
365
368
ScheduleActionStartWorkflow .class , description .getSchedule ().getAction ().getClass ());
366
369
ScheduleActionStartWorkflow startWfAction =
@@ -372,6 +375,7 @@ public void describeSchedules() {
372
375
(EncodedValues ) startWfAction .getOptions ().getMemo ().get ("memokey1" );
373
376
String memoValue = encodedMemo .get (0 , String .class );
374
377
Assert .assertEquals ("memoval1" , memoValue );
378
+ Assert .assertEquals (startWfAction .getOptions ().getRetryOptions (), retryOptions );
375
379
//
376
380
Assert .assertEquals (
377
381
ScheduleSpec .newBuilder (description .getSchedule ().getSpec ())
0 commit comments