Skip to content
Snippets Groups Projects
Commit 6a11e2d3 authored by Krzysztof Witukiewicz's avatar Krzysztof Witukiewicz
Browse files

OZG-7573 OZG-7991 Complete request

parent 7c77fcf7
No related branches found
No related tags found
1 merge request!27OZG-7573 Dateien Weiterleiten
......@@ -83,6 +83,7 @@ class EingangForwarder {
sendRouteForwarding(grpcRouteForwarding);
sendAttachments(attachments);
sendRepresentations(representations);
requestObserver.onCompleted();
waitForCompletion(future);
}
......
......@@ -95,6 +95,8 @@ class EingangForwarderTest {
@Mock
private GrpcRouteForwarding grpcRouteForwarding;
@Mock
private ClientCallStreamObserver<GrpcRouteForwardingRequest> requestObserver;
private final List<IncomingFileGroup> attachments = List.of(IncomingFileGroupTestFactory.create());
private final List<IncomingFile> representations = List.of(IncomingFileTestFactory.create());
@Mock
......@@ -107,6 +109,7 @@ class EingangForwarderTest {
doNothing().when(forwarder).sendAttachments(any());
doNothing().when(forwarder).sendRepresentations(any());
doNothing().when(forwarder).waitForCompletion(any());
setRequestObserverInForwarder(requestObserver);
}
@Test
......@@ -137,6 +140,13 @@ class EingangForwarderTest {
verify(forwarder).sendRepresentations(representations);
}
@Test
void shouldCompleteRequest() {
forwarder.forward(grpcRouteForwarding, attachments, representations);
verify(requestObserver).onCompleted();
}
@Test
void shouldWaitForCompletion() {
forwarder.forward(grpcRouteForwarding, attachments, representations);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment