Class HistoryPoller

java.lang.Object
software.amazon.lambda.durable.testing.HistoryPoller

public class HistoryPoller extends Object
Polls the GetDurableExecutionHistory API until execution completes or a timeout is reached. Used by CloudDurableTestRunner for synchronous test execution.
  • 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 poll
      pollInterval - the interval between poll requests
      timeout - 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