You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by me...@apache.org on 2014/10/17 01:16:00 UTC
git commit: [SQL] Fixes the race condition that may cause test failure
Repository: spark
Updated Branches:
refs/heads/master 091d32c52 -> 99e416b6d
[SQL] Fixes the race condition that may cause test failure
The removed `Future` was used to end the test case as soon as the Spark SQL CLI process exits. When the process exits prematurely, this mechanism prevents the test case to wait until timeout. But it also creates a race condition: when `foundAllExpectedAnswers.tryFailure` is called, there are chances that the last expected output line of the CLI process hasn't been caught by the main logics of the test code, thus fails the test case.
Removing this `Future` doesn't affect correctness.
Author: Cheng Lian <li...@gmail.com>
Closes #2823 from liancheng/clean-clisuite and squashes the following commits:
489a97c [Cheng Lian] Fixes the race condition that may cause test failure
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/99e416b6
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/99e416b6
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/99e416b6
Branch: refs/heads/master
Commit: 99e416b6d64402a5432a265797a1c155a38f4e6f
Parents: 091d32c
Author: Cheng Lian <li...@gmail.com>
Authored: Thu Oct 16 16:15:55 2014 -0700
Committer: Xiangrui Meng <me...@databricks.com>
Committed: Thu Oct 16 16:15:55 2014 -0700
----------------------------------------------------------------------
.../org/apache/spark/sql/hive/thriftserver/CliSuite.scala | 6 ------
1 file changed, 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/99e416b6/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
----------------------------------------------------------------------
diff --git a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
index fc97a25..8a72e9d 100644
--- a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
+++ b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
@@ -78,12 +78,6 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
val process = (Process(command) #< queryStream).run(
ProcessLogger(captureOutput("stdout"), captureOutput("stderr")))
- Future {
- val exitValue = process.exitValue()
- foundAllExpectedAnswers.tryFailure(
- new SparkException(s"Spark SQL CLI process exit value: $exitValue"))
- }
-
try {
Await.result(foundAllExpectedAnswers.future, timeout)
} catch { case cause: Throwable =>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org