@@ -285,7 +285,6 @@ public void callChildWorkflowWithOptions() {
285285 WorkflowTaskRetryPolicy retryPolicy = WorkflowTaskRetryPolicy .newBuilder ()
286286 .setMaxNumberOfAttempts (1 )
287287 .setFirstRetryInterval (Duration .ofSeconds (10 ))
288- .setRetryTimeout (Duration .ofSeconds (10 ))
289288 .build ();
290289 WorkflowTaskOptions executionOptions = new WorkflowTaskOptions (retryPolicy );
291290 ArgumentCaptor <TaskOptions > captor = ArgumentCaptor .forClass (TaskOptions .class );
@@ -305,7 +304,6 @@ public void callChildWorkflowWithOptions() {
305304
306305 assertEquals (retryPolicy .getMaxNumberOfAttempts (), taskOptions .getRetryPolicy ().getMaxNumberOfAttempts ());
307306 assertEquals (retryPolicy .getFirstRetryInterval (), taskOptions .getRetryPolicy ().getFirstRetryInterval ());
308- assertEquals (Duration .ZERO , taskOptions .getRetryPolicy ().getRetryTimeout ());
309307 }
310308
311309 @ Test
@@ -329,52 +327,4 @@ public void newUuidTestNoImplementationExceptionTest() {
329327 String expectedMessage = "No implementation found." ;
330328 assertEquals (expectedMessage , runtimeException .getMessage ());
331329 }
332-
333- @ Test
334- public void workflowRetryPolicyRetryTimeoutValueShouldHaveRightValueWhenBeingSet () {
335- String expectedName = "TestActivity" ;
336- String expectedInput = "TestInput" ;
337- String expectedInstanceId = "TestInstanceId" ;
338- WorkflowTaskRetryPolicy retryPolicy = WorkflowTaskRetryPolicy .newBuilder ()
339- .setMaxNumberOfAttempts (1 )
340- .setFirstRetryInterval (Duration .ofSeconds (10 ))
341- .setRetryTimeout (Duration .ofSeconds (10 ))
342- .build ();
343- WorkflowTaskOptions executionOptions = new WorkflowTaskOptions (retryPolicy );
344- ArgumentCaptor <TaskOptions > captor = ArgumentCaptor .forClass (TaskOptions .class );
345-
346- context .callChildWorkflow (expectedName , expectedInput , expectedInstanceId , executionOptions , String .class );
347-
348- verify (mockInnerContext , times (1 ))
349- .callSubOrchestrator (
350- eq (expectedName ),
351- eq (expectedInput ),
352- eq (expectedInstanceId ),
353- captor .capture (),
354- eq (String .class )
355- );
356-
357- TaskOptions taskOptions = captor .getValue ();
358-
359- assertEquals (Duration .ofSeconds (10 ), taskOptions .getRetryPolicy ().getRetryTimeout ());
360- }
361-
362- @ Test
363- public void workflowRetryPolicyRetryThrowIllegalArgumentWhenNullRetryTimeoutIsSet () {
364- assertThrows (IllegalArgumentException .class , () ->
365- WorkflowTaskRetryPolicy .newBuilder ()
366- .setMaxNumberOfAttempts (1 )
367- .setFirstRetryInterval (Duration .ofSeconds (10 ))
368- .setRetryTimeout (null )
369- .build ());
370- }
371-
372- @ Test
373- public void workflowRetryPolicyRetryThrowIllegalArgumentWhenRetryTimeoutIsLessThanMaxRetryInterval () {
374- assertThrows (IllegalArgumentException .class , () -> WorkflowTaskRetryPolicy .newBuilder ()
375- .setMaxNumberOfAttempts (1 )
376- .setFirstRetryInterval (Duration .ofSeconds (10 ))
377- .setRetryTimeout (Duration .ofSeconds (9 ))
378- .build ());
379- }
380330}
0 commit comments