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

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

                Author: ASF GitHub Bot
            Created on: 18/Apr/19 15:19
            Start Date: 18/Apr/19 15:19
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on pull request #8307: [BEAM-7027] 
Use same method to find a new local available port in IO tests
URL: https://github.com/apache/beam/pull/8307#discussion_r276688222
 
 

 ##########
 File path: 
sdks/java/io/cassandra/src/test/java/org/apache/beam/sdk/io/cassandra/CassandraIOTest.java
 ##########
 @@ -110,8 +109,8 @@
   private static CassandraShutDownHook shutdownHook;
 
   @BeforeClass
-  public static void startCassandra() throws Exception {
-    jmxPort = getFreeLocalPort();
+  public static void beforeClass() throws Exception {
+    jmxPort = NetworkTestHelper.getAvailableLocalPort();
 
 Review comment:
   Yes, I thought about this case too, but the solution does not seem to be so 
'easy' we cannot guarantee synchronization until the port is assigned and the 
embedded server started. The other alternative is to create a port pool and 
that seems a bit overkill (and error-prone).
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 229737)
    Time Spent: 3h 20m  (was: 3h 10m)

> Use same method to find a new local available port in IO tests
> --------------------------------------------------------------
>
>                 Key: BEAM-7027
>                 URL: https://issues.apache.org/jira/browse/BEAM-7027
>             Project: Beam
>          Issue Type: Test
>          Components: io-java-utilities
>            Reporter: Ismaël Mejía
>            Assignee: Ismaël Mejía
>            Priority: Major
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> Most IO tests include a snippet to find the number of an available local 
> port. This code could be shared by all IO tests. Also adding synchronization 
> may help prevent some port conflict issues in parallel runs.



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

Reply via email to