Skip to content

Commit b631901

Browse files
committed
[SPARK-17276] fix for sql.hive.execution.SQLQuerySuite
1 parent 247e852 commit b631901

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package org.apache.spark.sql.hive.execution
1919

2020
import java.sql.{Date, Timestamp}
2121

22-
import scala.sys.process.Process
22+
import scala.sys.process.{Process, ProcessLogger}
2323
import scala.util.Try
2424

2525
import org.apache.hadoop.fs.Path
@@ -1788,7 +1788,13 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
17881788
}
17891789

17901790
def testCommandAvailable(command: String): Boolean = {
1791-
val attempt = Try(Process(command).run().exitValue())
1791+
val attempt = Try(Process(command).run(
1792+
new ProcessLogger {
1793+
override def out(s: => String): Unit = ()
1794+
override def buffer[T](f: => T): T = f
1795+
override def err(s: => String): Unit = ()
1796+
}
1797+
).exitValue())
17921798
attempt.isSuccess && attempt.get == 0
17931799
}
17941800
}

0 commit comments

Comments
 (0)