Skip to content

Commit ee92a82

Browse files
committed
Relaxes timeout
1 parent 7fd6757 commit ee92a82

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
6262

6363
def captureOutput(source: String)(line: String) {
6464
buffer += s"$source> $line"
65+
// If we haven't found all expected answers...
6566
if (next.get() < expectedAnswers.size) {
67+
// If another expected answer is found...
6668
if (line.startsWith(expectedAnswers(next.get()))) {
69+
// If all expected answers have been found...
6770
if (next.incrementAndGet() == expectedAnswers.size) {
6871
foundAllExpectedAnswers.trySuccess(())
6972
}
@@ -111,7 +114,7 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
111114
val dataFilePath =
112115
Thread.currentThread().getContextClassLoader.getResource("data/files/small_kv.txt")
113116

114-
runCliWithin(1.minute)(
117+
runCliWithin(3.minute)(
115118
"CREATE TABLE hive_test(key INT, val STRING);"
116119
-> "OK",
117120
"SHOW TABLES;"

sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suite.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
4343

4444
val verbose = Option(System.getenv("SPARK_SQL_TEST_VERBOSE")).isDefined
4545

46-
def startThriftServerWithin(timeout: FiniteDuration = 10.seconds)(f: Statement => Unit) {
46+
def startThriftServerWithin(timeout: FiniteDuration = 1.minute)(f: Statement => Unit) {
4747
Thread.sleep(5000)
4848

4949
val startScript = "../../sbin/start-thriftserver.sh".split("/").mkString(File.separator)
@@ -79,15 +79,13 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
7979
var logFilePath: String = null
8080

8181
def captureLogOutput(line: String): Unit = {
82-
logInfo(s"server log | $line")
8382
buffer += line
8483
if (line.contains("ThriftBinaryCLIService listening on")) {
8584
serverRunning.success(())
8685
}
8786
}
8887

8988
def captureThriftServerOutput(source: String)(line: String): Unit = {
90-
logInfo(s"server $source | $line")
9189
if (line.startsWith(LOGGING_MARK)) {
9290
logFilePath = line.drop(LOGGING_MARK.length).trim
9391
// Ensure that the log file is created so that the `tail' command won't fail

0 commit comments

Comments
 (0)