[jira] [Work logged] (BEAM-5709) Tests in BeamFnControlServiceTest are flaky.

2018-10-12 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5709:


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

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/fn/BeamFnControlServiceTest.java
 
b/runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/fn/BeamFnControlServiceTest.java
index 7ba41fd7cc2..7f08a562ce5 100644
--- 
a/runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/fn/BeamFnControlServiceTest.java
+++ 
b/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.
+
 verify(requestObserver).onCompleted();
 verifyNoMoreInteractions(requestObserver);
   }
@@ -126,6 +128,8 @@ public void testMultipleClientsConnecting() throws 
Exception {
 server.shutdown();
 server.awaitTermination(1, TimeUnit.SECONDS);
 server.shutdownNow();
+Thread.sleep(1000); // Wait for stub to close stream.
+
 verify(requestObserver).onCompleted();
 verifyNoMoreInteractions(requestObserver);
 verify(anotherRequestObserver).onCompleted();


 


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

> 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: 1.5h
>  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)


[jira] [Work logged] (BEAM-5709) Tests in BeamFnControlServiceTest are flaky.

2018-10-10 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/BEAM-5709?focusedWorklogId=153306=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)


[jira] [Work logged] (BEAM-5709) Tests in BeamFnControlServiceTest are flaky.

2018-10-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5709:


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

 ##
 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:
   That sounds like a good idea. I'm assuming with that method some kind of 
timeout would be set on the latch, so that if onCompleted doesn't get called in 
a certain timespan we can fail the test?


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: 153303)
Time Spent: 1h  (was: 50m)

> 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
>  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)


[jira] [Work logged] (BEAM-5709) Tests in BeamFnControlServiceTest are flaky.

2018-10-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5709:


Author: ASF GitHub Bot
Created on: 10/Oct/18 21:10
Start Date: 10/Oct/18 21:10
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_r224242679
 
 

 ##
 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:
   Fixing a flake is important enough that we can merge this, but please keep a 
ticket open. If you have time and inclination to fix the test to use a latch 
instead of a sleep, that would be preferable. I imagine you can do this with 
the mocks by inserting code to run when onCompleted is called, or you could 
move away from mocks since StreamObserver is easy to implement.


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: 153288)
Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)


[jira] [Work logged] (BEAM-5709) Tests in BeamFnControlServiceTest are flaky.

2018-10-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5709:


Author: ASF GitHub Bot
Created on: 10/Oct/18 20:56
Start Date: 10/Oct/18 20:56
Worklog Time Spent: 10m 
  Work Description: boyuanzz commented on issue #6639: [BEAM-5709] Fix 
flaky tests in BeamFnControlServiceTest.
URL: https://github.com/apache/beam/pull/6639#issuecomment-428728741
 
 
   Thanks for this! Please wait for all tests pass.


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: 153285)
Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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)


[jira] [Work logged] (BEAM-5709) Tests in BeamFnControlServiceTest are flaky.

2018-10-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5709:


Author: ASF GitHub Bot
Created on: 10/Oct/18 20:55
Start Date: 10/Oct/18 20:55
Worklog Time Spent: 10m 
  Work Description: youngoli commented on issue #6639: [BEAM-5709] Fix 
flaky tests in BeamFnControlServiceTest.
URL: https://github.com/apache/beam/pull/6639#issuecomment-428728341
 
 
   CC: @kennknowles
   
   For committer approval once this is reviewed.


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: 153284)
Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  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)


[jira] [Work logged] (BEAM-5709) Tests in BeamFnControlServiceTest are flaky.

2018-10-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5709:


Author: ASF GitHub Bot
Created on: 10/Oct/18 20:53
Start Date: 10/Oct/18 20:53
Worklog Time Spent: 10m 
  Work Description: youngoli commented on issue #6639: [BEAM-5709] Fix 
flaky tests in BeamFnControlServiceTest.
URL: https://github.com/apache/beam/pull/6639#issuecomment-428727871
 
 
   R: @boyuanzz 


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: 153282)
Time Spent: 20m  (was: 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: 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)


[jira] [Work logged] (BEAM-5709) Tests in BeamFnControlServiceTest are flaky.

2018-10-10 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on BEAM-5709:


Author: ASF GitHub Bot
Created on: 10/Oct/18 20:48
Start Date: 10/Oct/18 20:48
Worklog Time Spent: 10m 
  Work Description: youngoli opened a new pull request #6639: [BEAM-5709] 
Fix flaky tests in BeamFnControlServiceTest.
URL: https://github.com/apache/beam/pull/6639
 
 
   See the Jira issue for a description of the cause of the flakiness. This 
attempts to fix the issue by waiting a sufficiently long time for any actions 
that rely on the server shutdown to finish.
   
   
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [x] Format the pull request title like `[BEAM-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA 
issue, if applicable. This will automatically link the pull request to the 
issue.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   It will help us expedite review of your Pull Request if you tag someone 
(e.g. `@username`) to look at it.
   
   Post-Commit Tests Status (on master branch)
   

   
   Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
   --- | --- | --- | --- | --- | --- | --- | ---
   Go | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/)
 | --- | --- | --- | --- | --- | ---
   Java | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/)
   Python | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/)
 | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)
  [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/)
 | --- | --- | ---
   
   
   
   
   


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: 153278)
Time Spent: 10m
Remaining Estimate: 0h

> Tests in BeamFnControlServiceTest are flaky.
> 
>
> Key: BEAM-5709
> URL: