Package akka.javasdk.testkit
Interface SseRouteTester
public interface SseRouteTester
-
Method Summary
Modifier and TypeMethodDescriptionList<akka.http.javadsl.model.sse.ServerSentEvent> receiveFirstN(String path, int count, Duration timeout) List<akka.http.javadsl.model.sse.ServerSentEvent> receiveNFromOffset(String path, int count, String startFromId, Duration timeout)
-
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 SSEcount- A number of events to wait for- Returns:
countevents that the endpoint emitted before the timeout hit- Throws:
TimeoutException- if the service did not emitcountevents 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 SSEcount- A number of events to wait forstartFromId- An SSE id to pass to the endpoint as point to resume from- Returns:
countevents that the endpoint emitted before the timeout hit- Throws:
TimeoutException- if the service did not emitcountevents before the timeout hit
-