[ 
https://issues.apache.org/jira/browse/BEAM-3326?focusedWorklogId=85298&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-85298
 ]

ASF GitHub Bot logged work on BEAM-3326:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Mar/18 15:43
            Start Date: 28/Mar/18 15:43
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #4963: 
[BEAM-3326] Abstract away closing the inbound receiver, waiting for the bundle 
to finish, waiting for outbound to complete within the ActiveBundle.
URL: https://github.com/apache/beam/pull/4963#discussion_r177795953
 
 

 ##########
 File path: 
runners/java-fn-execution/src/test/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClientTest.java
 ##########
 @@ -221,6 +220,135 @@ public void testNewBundleAndProcessElements() throws 
Exception {
             WindowedValue.valueInGlobalWindow("eggs")));
   }
 
+  @Test
+  public void handleCleanupWhenInputSenderFails() throws Exception {
+    String descriptorId1 = "descriptor1";
+    Exception testException = new Exception();
+
+    InboundDataClient mockOutputReceiver = mock(InboundDataClient.class);
+    CloseableFnDataReceiver mockInputSender = 
mock(CloseableFnDataReceiver.class);
+
+    ProcessBundleDescriptor descriptor =
+        ProcessBundleDescriptor.newBuilder().setId(descriptorId1).build();
+    CompletableFuture<InstructionResponse> processBundleResponseFuture =
+        new CompletableFuture<>();
+    when(fnApiControlClient.handle(any(BeamFnApi.InstructionRequest.class)))
+        .thenReturn(new CompletableFuture<>())
+        .thenReturn(processBundleResponseFuture);
+
+    FullWindowedValueCoder<String> coder =
+        FullWindowedValueCoder.of(StringUtf8Coder.of(), Coder.INSTANCE);
+    BundleProcessor<String> processor =
+        sdkHarnessClient.getProcessor(
+            descriptor, RemoteInputDestination.of(coder, 
Target.getDefaultInstance()));
+    when(dataService.receive(any(), any(), 
any())).thenReturn(mockOutputReceiver);
 
 Review comment:
   I'll fix the comment in a separate PR and merge this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 85298)
    Time Spent: 4h 10m  (was: 4h)

> Execute a Stage via the portability framework in the ReferenceRunner
> --------------------------------------------------------------------
>
>                 Key: BEAM-3326
>                 URL: https://issues.apache.org/jira/browse/BEAM-3326
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-core
>            Reporter: Thomas Groh
>            Assignee: Thomas Groh
>            Priority: Major
>              Labels: portability
>          Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> This is the supertask for remote execution in the Universal Local Runner 
> (BEAM-2899).
> This executes a stage remotely via portability framework APIs



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to