Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/4435#discussion_r27917309
--- Diff:
core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala ---
@@ -14,22 +14,166 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.spark.deploy.history
-import javax.servlet.http.HttpServletRequest
-
-import scala.collection.mutable
+import java.io.{File, FileInputStream, FileWriter, IOException}
+import java.net.{HttpURLConnection, URL}
+import javax.servlet.http.{HttpServletRequest, HttpServletResponse}
-import org.apache.hadoop.fs.Path
-import org.mockito.Mockito.{when}
-import org.scalatest.FunSuite
-import org.scalatest.Matchers
+import org.apache.commons.io.{FileUtils, IOUtils}
+import org.mockito.Mockito.when
+import org.scalatest.{BeforeAndAfter, FunSuite, Matchers}
import org.scalatest.mock.MockitoSugar
+import org.apache.spark.{JsonTestUtils, SecurityManager, SparkConf}
import org.apache.spark.ui.SparkUI
-class HistoryServerSuite extends FunSuite with Matchers with MockitoSugar {
+class HistoryServerSuite extends FunSuite with BeforeAndAfter with
Matchers with MockitoSugar
+ with JsonTestUtils {
+
+ private val logDir = new File("src/test/resources/spark-events")
+ private val expRoot = new
File("src/test/resources/HistoryServerExpectations/")
+ private val port = 18080
--- End diff --
Unlikely to cause problems (fingers crossed?), but it's generally sketchy
to hardcode port numbers in tests.
---
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]