File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,11 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
62
62
63
63
def captureOutput (source : String )(line : String ) {
64
64
buffer += s " $source> $line"
65
+ // If we haven't found all expected answers...
65
66
if (next.get() < expectedAnswers.size) {
67
+ // If another expected answer is found...
66
68
if (line.startsWith(expectedAnswers(next.get()))) {
69
+ // If all expected answers have been found...
67
70
if (next.incrementAndGet() == expectedAnswers.size) {
68
71
foundAllExpectedAnswers.trySuccess(())
69
72
}
@@ -111,7 +114,7 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
111
114
val dataFilePath =
112
115
Thread .currentThread().getContextClassLoader.getResource(" data/files/small_kv.txt" )
113
116
114
- runCliWithin(1 .minute)(
117
+ runCliWithin(3 .minute)(
115
118
" CREATE TABLE hive_test(key INT, val STRING);"
116
119
-> " OK" ,
117
120
" SHOW TABLES;"
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
43
43
44
44
val verbose = Option (System .getenv(" SPARK_SQL_TEST_VERBOSE" )).isDefined
45
45
46
- def startThriftServerWithin (timeout : FiniteDuration = 10 .seconds )(f : Statement => Unit ) {
46
+ def startThriftServerWithin (timeout : FiniteDuration = 1 .minute )(f : Statement => Unit ) {
47
47
Thread .sleep(5000 )
48
48
49
49
val startScript = " ../../sbin/start-thriftserver.sh" .split(" /" ).mkString(File .separator)
@@ -79,15 +79,13 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
79
79
var logFilePath : String = null
80
80
81
81
def captureLogOutput (line : String ): Unit = {
82
- logInfo(s " server log | $line" )
83
82
buffer += line
84
83
if (line.contains(" ThriftBinaryCLIService listening on" )) {
85
84
serverRunning.success(())
86
85
}
87
86
}
88
87
89
88
def captureThriftServerOutput (source : String )(line : String ): Unit = {
90
- logInfo(s " server $source | $line" )
91
89
if (line.startsWith(LOGGING_MARK )) {
92
90
logFilePath = line.drop(LOGGING_MARK .length).trim
93
91
// Ensure that the log file is created so that the `tail' command won't fail
You can’t perform that action at this time.
0 commit comments