You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2021/02/09 02:00:27 UTC

[spark] branch branch-3.1 updated: [SPARK-34352][SQL] Improve SQLQueryTestSuite so as could run on windows system

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new db8db0d  [SPARK-34352][SQL] Improve SQLQueryTestSuite so as could run on windows system
db8db0d is described below

commit db8db0da1c2da24c191b0b89a0fcaa55eafeb7ef
Author: gengjiaan <ge...@360.cn>
AuthorDate: Tue Feb 9 10:58:58 2021 +0900

    [SPARK-34352][SQL] Improve SQLQueryTestSuite so as could run on windows system
    
    ### What changes were proposed in this pull request?
    The current implement of `SQLQueryTestSuite` cannot run on windows system.
    Becasue the code below will fail on windows system:
    `assume(TestUtils.testCommandAvailable("/bin/bash"))`
    
    For operation system that cannot support `/bin/bash`, we just skip some tests.
    
    ### Why are the changes needed?
    SQLQueryTestSuite has a bug on windows system.
    
    ### Does this PR introduce _any_ user-facing change?
    'No'.
    
    ### How was this patch tested?
    Jenkins test
    
    Closes #31466 from beliefer/SPARK-34352.
    
    Authored-by: gengjiaan <ge...@360.cn>
    Signed-off-by: HyukjinKwon <gu...@apache.org>
    (cherry picked from commit e65b28cf7d9680ebdf96833a6f2d38ffd61c7d21)
    Signed-off-by: HyukjinKwon <gu...@apache.org>
---
 .../src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
index 02c6fba..b573f94 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
@@ -154,10 +154,14 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession with SQLHelper
     // Fewer shuffle partitions to speed up testing.
     .set(SQLConf.SHUFFLE_PARTITIONS, 4)
 
+  // SPARK-32106 Since we add SQL test 'transform.sql' will use `cat` command,
+  // here we need to ignore it.
+  private val otherIgnoreList =
+    if (TestUtils.testCommandAvailable("/bin/bash")) Nil else Set("transform.sql")
   /** List of test cases to ignore, in lower cases. */
   protected def ignoreList: Set[String] = Set(
-    "ignored.sql"   // Do NOT remove this one. It is here to test the ignore functionality.
-  )
+    "ignored.sql" // Do NOT remove this one. It is here to test the ignore functionality.
+  ) ++ otherIgnoreList
 
   // Create all the test cases.
   listTestCases.foreach(createScalaTestCase)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org