Skip to content
Closed
Prev Previous commit
Next Next commit
Disabled newly added suite by default.
  • Loading branch information
sarutak committed May 24, 2020
commit 6b47fe8cccca0460ec7c0db0e16c29535f1d01b8
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ abstract class RealBrowserUISeleniumSuite(val driverProp: String)
implicit var webDriver: WebDriver
private val driverPropPrefix = "spark.test."

override def beforeAll() {
override def beforeAll(): Unit = {
super.beforeAll()
assume(
sys.props(driverPropPrefix + driverProp) !== null,
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
<leveldbjni.group>org.fusesource.leveldbjni</leveldbjni.group>

<test.java.home>${java.home}</test.java.home>
<test.exclude.tags></test.exclude.tags>
<test.exclude.tags>org.apache.spark.tags.ChromeUITest</test.exclude.tags>
Copy link
Member

Choose a reason for hiding this comment

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

Could you add some comment before this line?

<test.include.tags></test.include.tags>

<!-- Package to use when relocating shaded classes. -->
Expand Down
9 changes: 6 additions & 3 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,9 @@ object TestSettings {
"2.12"
}
*/

private val defaultExcludedTagsForScalaTest = Seq("org.apache.spark.tags.ChromeUITest")

lazy val settings = Seq (
// Fork new JVMs for tests and set Java options for those
fork := true,
Expand Down Expand Up @@ -1001,9 +1004,9 @@ object TestSettings {
javaOptions += "-Xmx3g",
// Exclude tags defined in a system property
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest,
sys.props.get("test.exclude.tags").map { tags =>
tags.split(",").flatMap { tag => Seq("-l", tag) }.toSeq
}.getOrElse(Nil): _*),
sys.props.get("test.exclude.tags").map(tag => tag.split(",").toSeq)
.getOrElse(defaultExcludedTagsForScalaTest).filter(!_.trim.isEmpty)
Copy link
Member

@dongjoon-hyun dongjoon-hyun May 24, 2020

Choose a reason for hiding this comment

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

This looks not robust enough.
If a developer set an irrelevant tag (ExtendedSQLTest or ExtendedHiveTest), ChromeUITest suddenly will cause a failure in the irrelevant Core module. Did I understand correctly?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's what I intended that if developers set test.excluded.tags explicitly, all the tags which are intended to be excluded should be added explicitly.
But as you concerned, this change seems to break the build compatibility.
I'll submit another idea.

.flatMap(tag => Seq("-l", tag)): _*),
testOptions in Test += Tests.Argument(TestFrameworks.JUnit,
sys.props.get("test.exclude.tags").map { tags =>
Seq("--exclude-categories=" + tags)
Expand Down