Skip to content

Commit

Permalink
Modified default port used in FlumeStreamSuite from 23456 to random v…
Browse files Browse the repository at this point in the history
…alue
  • Loading branch information
sarutak committed Feb 3, 2015
1 parent bebf4c4 commit 8212e42
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import org.scalatest.concurrent.Eventually._
import org.apache.spark.{Logging, SparkConf}
import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.{Milliseconds, StreamingContext, TestOutputStream}
import org.apache.spark.streaming.scheduler.{StreamingListener, StreamingListenerReceiverStarted}
import org.apache.spark.util.Utils

class FlumeStreamSuite extends FunSuite with BeforeAndAfter with Matchers with Logging {
Expand Down Expand Up @@ -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) => {
val socket = new ServerSocket(trialPort)
socket.close()
(null, trialPort)
Expand Down

0 comments on commit 8212e42

Please sign in to comment.