Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset log4j level to INFO #2

Merged
merged 1 commit into from
Oct 8, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import java.sql.{DriverManager, Statement}
import java.util.concurrent.TimeoutException

import scala.collection.mutable.ArrayBuffer
import scala.collection.JavaConversions._
import scala.concurrent.duration._
import scala.concurrent.{Await, Promise}
import scala.sys.process.{Process, ProcessLogger}
Expand All @@ -42,7 +43,12 @@ class HiveThriftServer2Suite extends FunSuite with Logging {
Class.forName(classOf[HiveDriver].getCanonicalName)

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

// Since we use info to assert server process started successfully,
// make sure that log4j level is INFO
org.apache.log4j.LogManager.getCurrentLoggers.foreach { log =>
log.asInstanceOf[org.apache.log4j.Logger].setLevel(org.apache.log4j.Level.INFO)
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must put this in beforeAll, otherwise the Maven Jenkins build may fail. Because Maven always instantiate all test suite objects first and then execute all the test cases. If some test suite in hive packages is constructed after this one, Maven tests will fail.

def startThriftServerWithin(timeout: FiniteDuration = 1.minute)(f: Statement => Unit) {
Thread.sleep(5000)

Expand Down