@@ -23,7 +23,6 @@ import java.sql.{DriverManager, Statement}
23
23
import java .util .concurrent .TimeoutException
24
24
25
25
import scala .collection .mutable .ArrayBuffer
26
- import scala .collection .JavaConversions ._
27
26
import scala .concurrent .duration ._
28
27
import scala .concurrent .{Await , Promise }
29
28
import scala .sys .process .{Process , ProcessLogger }
@@ -43,11 +42,6 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
43
42
Class .forName(classOf [HiveDriver ].getCanonicalName)
44
43
45
44
val verbose = Option (System .getenv(" SPARK_SQL_TEST_VERBOSE" )).isDefined
46
- // Since we use info to assert server process started successfully,
47
- // make sure that log4j level is INFO
48
- org.apache.log4j.LogManager .getCurrentLoggers.foreach { log =>
49
- log.asInstanceOf [org.apache.log4j.Logger ].setLevel(org.apache.log4j.Level .INFO )
50
- }
51
45
52
46
def startThriftServerWithin (timeout : FiniteDuration = 1 .minute)(f : Statement => Unit ) {
53
47
Thread .sleep(5000 )
@@ -100,8 +94,8 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
100
94
.run(ProcessLogger (captureLogOutput, _ => ()))
101
95
}
102
96
}
103
-
104
- Process (command).run(ProcessLogger (
97
+ // reset SPARK_TESTING to avoid loading Log4J configurations in testing class paths
98
+ Process (command, None , ( " SPARK_TESTING " , " 0 " ) ).run(ProcessLogger (
105
99
captureThriftServerOutput(" stdout" ),
106
100
captureThriftServerOutput(" stderr" )))
107
101
0 commit comments