Class HistoryPoller
java.lang.Object
software.amazon.lambda.durable.testing.HistoryPoller
Polls the GetDurableExecutionHistory API until execution completes or a timeout is reached. Used by
CloudDurableTestRunner for synchronous test execution.-
Constructor Summary
ConstructorsConstructorDescriptionHistoryPoller(software.amazon.awssdk.services.lambda.LambdaClient lambdaClient) Creates a poller backed by the given Lambda client. -
Method Summary
Modifier and TypeMethodDescriptionList<software.amazon.awssdk.services.lambda.model.Event>pollUntilComplete(String executionArn, Duration pollInterval, Duration timeout) Polls execution history until a terminal event is found or the timeout is exceeded.
-
Constructor Details
-
HistoryPoller
public HistoryPoller(software.amazon.awssdk.services.lambda.LambdaClient lambdaClient) Creates a poller backed by the given Lambda client.
-
-
Method Details
-
pollUntilComplete
public List<software.amazon.awssdk.services.lambda.model.Event> pollUntilComplete(String executionArn, Duration pollInterval, Duration timeout) Polls execution history until a terminal event is found or the timeout is exceeded.- Parameters:
executionArn- the durable execution ARN to pollpollInterval- the interval between poll requeststimeout- the maximum time to wait for completion- Returns:
- all history events collected during polling
- Throws:
RuntimeException- if the timeout is exceeded or polling is interrupted
-