Github user liancheng commented on a diff in the pull request: https://github.com/apache/spark/pull/2671#discussion_r18458935 --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suite.scala --- @@ -70,37 +73,39 @@ class HiveThriftServer2Suite extends FunSuite with Logging { val serverStarted = Promise[Unit]() val buffer = new ArrayBuffer[String]() + val startString = + "starting org.apache.spark.sql.hive.thriftserver.HiveThriftServer2, logging to " + val maxTries = 30 def captureOutput(source: String)(line: String) { buffer += s"$source> $line" - if (line.contains("ThriftBinaryCLIService listening on")) { - serverStarted.success(()) + if (line.contains(startString)) { + val logFile = new File(line.substring(startString.length)) + var tryNum = 0 + // This is a hack to wait logFile ready + Thread.sleep(5000) + // logFile may have not finished, try every second + while (!logFile.exists() || (!fileToString(logFile).contains( + "ThriftBinaryCLIService listening on") && tryNum < maxTries)) { --- End diff -- `tryNum` is never increased.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org