Interface SseRouteTester


public interface SseRouteTester
  • Method Details

    • receiveFirstN

      List<akka.http.javadsl.model.sse.ServerSentEvent> receiveFirstN(String path, int count, Duration timeout)
      Parameters:
      path - A path in the service that responds with SSE
      count - A number of events to wait for
      Returns:
      count events that the endpoint emitted before the timeout hit
      Throws:
      TimeoutException - if the service did not emit count events before the timeout hit
    • receiveNFromOffset

      List<akka.http.javadsl.model.sse.ServerSentEvent> receiveNFromOffset(String path, int count, String startFromId, Duration timeout)
      Parameters:
      path - A path in the service that responds with SSE
      count - A number of events to wait for
      startFromId - An SSE id to pass to the endpoint as point to resume from
      Returns:
      count events that the endpoint emitted before the timeout hit
      Throws:
      TimeoutException - if the service did not emit count events before the timeout hit