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

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

                Author: ASF GitHub Bot
            Created on: 10/Oct/18 22:27
            Start Date: 10/Oct/18 22:27
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on a change in pull request 
#6639: [BEAM-5709] Fix flaky tests in BeamFnControlServiceTest.
URL: https://github.com/apache/beam/pull/6639#discussion_r224261995
 
 

 ##########
 File path: 
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/fn/BeamFnControlServiceTest.java
 ##########
 @@ -88,6 +88,8 @@ public void testClientConnecting() throws Exception {
     server.shutdown();
     server.awaitTermination(1, TimeUnit.SECONDS);
     server.shutdownNow();
+    Thread.sleep(1000);  // Wait for stub to close stream.
 
 Review comment:
   Yes. And since it is just a unit test that won't have wide variance, we can 
just put `@Test(timeout=2000)` on the method using JUnit's support. So in the 
happy case it succeeds instantly, and failure by timeout in 2 seconds.

----------------------------------------------------------------
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: 153306)
    Time Spent: 1h 20m  (was: 1h 10m)

> Tests in BeamFnControlServiceTest are flaky.
> --------------------------------------------
>
>                 Key: BEAM-5709
>                 URL: https://issues.apache.org/jira/browse/BEAM-5709
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-dataflow
>            Reporter: Daniel Oliveira
>            Assignee: Daniel Oliveira
>            Priority: Minor
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> https://github.com/apache/beam/blob/master/runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/fn/BeamFnControlServiceTest.java
> Tests for BeamFnControlService are currently flaky. The test attempts to 
> verify that onCompleted was called on the mock streams, but that function 
> gets called on a separate thread, so occasionally the function will not have 
> been called yet, despite the server being shut down.



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

Reply via email to