Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Conversation

lins05
Copy link

@lins05 lins05 commented Jan 25, 2017

What changes were proposed in this pull request?

  • Enable spark ui explicitly for the in-process submit test case
  • Fixed some broken assertions in integration tests
  • Fixed a scalastyle error in SparkDockerImageBuilder.scala
  • Log into target/integration-tests.log like other modules

How was this patch tested?

Run the k8s integration tests manually. Before the patch the integration tests would fail even before the first case is executed. Now it finishes successfully with:

Run starting. Expected test count is: 4
KubernetesSuite:
- Run a simple example
- Run using spark-submit
- Run using spark-submit with the examples jar on the docker image
- Run with custom labels
Run completed in 1 minute, 58 seconds.
Total number of tests run: 4
Suites: completed 2, aborted 0
Tests: succeeded 4, failed 0, canceled 0, ignored 0, pending 0
All tests passed.

log4j.logger.org.apache.hadoop=WARN
log4j.logger.org.eclipse.jetty=WARN
log4j.logger.org.mortbay=WARN
log4j.logger.org.spark_project.jetty=WARN
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is needed for each sub module. Otherwise it would throw errors like the one mentioned in https://issues.apache.org/jira/browse/SPARK-17543.

I guess it's because scalatest-maven-plugin sets the log4j.configuration property to file:src/test/resources/log4j.properties. See https://github.com/apache/spark/blob/v2.1.0/pom.xml#L2019

@@ -152,6 +158,8 @@ private[spark] class KubernetesSuite extends SparkFunSuite with BeforeAndAfter {
.set("spark.executor.cores", "1")
.set("spark.executors.instances", "1")
.set("spark.app.id", "spark-pi")
.set("spark.ui.enabled", "true")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think other tests need this too - wherever we invoke expectationsForStaticAllocation(). Although, part of improving the integration tests would be to find something other than the UI to rely on for checking the correctness.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Updated.

- Enable spark ui explicitly for in-process submit
- Fixed some broken assertions in integration tests
- Fixed a scalastyle error in SparkDockerImageBuilder.scala
- Log into target/integration-tests.log like other modules
@lins05 lins05 force-pushed the fix-k8s-integration-tests branch from f46c19d to 221050c Compare January 26, 2017 06:01
@lins05
Copy link
Author

lins05 commented Jan 27, 2017

ping @mccheah

@mccheah mccheah merged commit 422dceb into apache-spark-on-k8s:k8s-support-alternate-incremental Jan 27, 2017
@lins05 lins05 deleted the fix-k8s-integration-tests branch January 27, 2017 00:26
ash211 pushed a commit that referenced this pull request Feb 8, 2017
* Fixed k8s integration test

- Enable spark ui explicitly for in-process submit
- Fixed some broken assertions in integration tests
- Fixed a scalastyle error in SparkDockerImageBuilder.scala
- Log into target/integration-tests.log like other modules

* Fixed line length.

* CR
ash211 pushed a commit that referenced this pull request Mar 8, 2017
* Fixed k8s integration test

- Enable spark ui explicitly for in-process submit
- Fixed some broken assertions in integration tests
- Fixed a scalastyle error in SparkDockerImageBuilder.scala
- Log into target/integration-tests.log like other modules

* Fixed line length.

* CR
foxish pushed a commit that referenced this pull request Jul 24, 2017
* Fixed k8s integration test

- Enable spark ui explicitly for in-process submit
- Fixed some broken assertions in integration tests
- Fixed a scalastyle error in SparkDockerImageBuilder.scala
- Log into target/integration-tests.log like other modules

* Fixed line length.

* CR
ifilonenko pushed a commit to ifilonenko/spark that referenced this pull request Feb 25, 2019
ifilonenko pushed a commit to ifilonenko/spark that referenced this pull request Feb 25, 2019
* Fixed k8s integration test

- Enable spark ui explicitly for in-process submit
- Fixed some broken assertions in integration tests
- Fixed a scalastyle error in SparkDockerImageBuilder.scala
- Log into target/integration-tests.log like other modules

* Fixed line length.

* CR
puneetloya pushed a commit to puneetloya/spark that referenced this pull request Mar 11, 2019
* Fixed k8s integration test

- Enable spark ui explicitly for in-process submit
- Fixed some broken assertions in integration tests
- Fixed a scalastyle error in SparkDockerImageBuilder.scala
- Log into target/integration-tests.log like other modules

* Fixed line length.

* CR
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants