diff options
author | Aaron Davidson <aaron@databricks.com> | 2014-05-22 15:11:05 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-05-22 15:11:05 -0700 |
commit | f9f5fd5f4e81828a3e0c391892e0f28751568843 (patch) | |
tree | bfc3dd7f645422d41555967307ce5aa91ef59171 /core | |
parent | dba314029b4c9d72d7e48a2093b39edd01931f57 (diff) | |
download | spark-f9f5fd5f4e81828a3e0c391892e0f28751568843.tar.gz spark-f9f5fd5f4e81828a3e0c391892e0f28751568843.tar.bz2 spark-f9f5fd5f4e81828a3e0c391892e0f28751568843.zip |
Fix UISuite unit test that fails under Jenkins contention
Due to perhaps zombie processes on Jenkins, it seems that at least 10
Spark ports are in use. It also doesn't matter that the port increases
when used, it could in fact go down -- the only part that matters is
that it selects a different port rather than failing to bind.
Changed test to match this.
Thanks to @andrewor14 for helping diagnose this.
Author: Aaron Davidson <aaron@databricks.com>
Closes #857 from aarondav/tiny and squashes the following commits:
c199ec8 [Aaron Davidson] Fix UISuite unit test that fails under Jenkins contention
Diffstat (limited to 'core')
-rw-r--r-- | core/src/test/scala/org/apache/spark/ui/UISuite.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/test/scala/org/apache/spark/ui/UISuite.scala b/core/src/test/scala/org/apache/spark/ui/UISuite.scala index fff8020ade..038746d2ed 100644 --- a/core/src/test/scala/org/apache/spark/ui/UISuite.scala +++ b/core/src/test/scala/org/apache/spark/ui/UISuite.scala @@ -94,7 +94,7 @@ class UISuite extends FunSuite { } } - test("jetty port increases under contention") { + test("jetty selects different port under contention") { val startPort = 4040 val server = new Server(startPort) @@ -110,8 +110,9 @@ class UISuite extends FunSuite { // Allow some wiggle room in case ports on the machine are under contention val boundPort1 = serverInfo1.boundPort val boundPort2 = serverInfo2.boundPort - assert(boundPort1 > startPort && boundPort1 < startPort + 10) - assert(boundPort2 > boundPort1 && boundPort2 < boundPort1 + 10) + assert(boundPort1 != startPort) + assert(boundPort2 != startPort) + assert(boundPort1 != boundPort2) } test("jetty binds to port 0 correctly") { |