Shreyas arya

Generation

testsTue, 14 Feb 2023

void executeRetryStepFunction(WorkflowExecution execution, String stepFunctionArn) { int retryCounter = 0 while (retryCounter <= MAX_ATTEMPTS) { try { workflowExecutionInitiatorService.addExecuteStepFunction(execution, stepFunctionArn) } catch (e) { log.warn("Received exception " + e.message + ".during the retry step function.") if (retryCounter < MAX_ATTEMPTS) { retryCounter++ Thread.sleep(DELAY_IN_MILLIS) log.warn("Attempting to retry function for. Retry attempt #$retryCounter.") } else { log.warn("Failed on final retry attempt #$retryCounter. Throwing exception.") throw new RetryFailedException(e) } } } } }

If you are using IntelliJ you can run the tests by right clicking on the `test_add` method and selecting 'Run TestAdd.test_add'. ## Assignments ### Problem One Write a function that takes an array of integers and returns their sum. For example `sum([1, 2, 3])` should return 6 ### Problem Two Write a function that takes an array of integers and returns their average. For example, `average([1, 2, 3])` should return 2 ### Problem Three Write a function that takes an array of integers, and returns the index of the array that holds the largest value. For example, `indexOfMax([1, 2, 3, 2, 1])` should return 2 ### Problem Four Write a function that takes an array of integers, and returns the largest value. For example, `max([1, 2, 3, 2, 1])` should return 3 ### Problem Five Write a function that takes an array of integers, and returns the smallest value. For example, `min

Questions about programming?Chat with your personal AI assistant