Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4337#discussion_r24235002
  
    --- Diff: 
external/flume/src/test/scala/org/apache/spark/streaming/flume/FlumeStreamSuite.scala
 ---
    @@ -76,7 +75,7 @@ class FlumeStreamSuite extends FunSuite with 
BeforeAndAfter with Matchers with L
     
       /** Find a free port */
       private def findFreePort(): Int = {
    -    Utils.startServiceOnPort(23456, (trialPort: Int) => {
    +    Utils.startServiceOnPort((math.random * Int.MaxValue).toInt, 
(trialPort: Int) => {
    --- End diff --
    
    I like the idea but surely you don't mean to choose a random port from 0 to 
2 billion? surely something in [1024,65536)? `1024 + new Random().nextInt(65536 
- 1024)` or similar?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to