Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dev/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ def main():
# If we're running the tests in Github Actions, attempt to detect and test
# only the affected modules.
if test_env == "github_actions":
# Set the log level of sbt as ERROR to make the output more readable.
if build_tool == "sbt":
extra_profiles.append("--error")
if os.environ["GITHUB_BASE_REF"] != "":
# Pull requests
changed_files = identify_changed_files_from_git_commits(
Expand Down
5 changes: 5 additions & 0 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,11 @@ object TestSettings {
}.getOrElse(Nil): _*),
// Show full stack trace and duration in test cases.
testOptions in Test += Tests.Argument("-oDF"),
// Show only the failed test cases in github action to make the log more readable.
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest,
sys.env.get("GITHUB_ACTIONS").map { _ =>
Seq("-eNCXEHLOPQMDF")
}.getOrElse(Nil): _*),
testOptions in Test += Tests.Argument(TestFrameworks.JUnit, "-v", "-a"),
// Required to detect Junit tests for each project, see also https://github.com/sbt/junit-interface/issues/35
crossPaths := false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class RowSuite extends SparkFunSuite with SharedSparkSession {

test("get values by field name on Row created via .toDF") {
val row = Seq((1, Seq(1))).toDF("a", "b").first()
assert(row.getAs[Int]("a") === 1)
assert(row.getAs[Int]("a") === 2)
assert(row.getAs[Seq[Int]]("b") === Seq(1))

intercept[IllegalArgumentException]{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
|SELECT r.*
|FROM testData l join testData2 r on (l.key = r.a)
""".stripMargin),
Row(1, 1) :: Row(1, 2) :: Row(2, 1) :: Row(2, 2) :: Row(3, 1) :: Row(3, 2) :: Nil)
Row(3, 2) :: Nil)
}

test("self join with alias in agg") {
Expand Down