Github user liancheng commented on a diff in the pull request: https://github.com/apache/spark/pull/9056#discussion_r44510252 --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala --- @@ -462,6 +462,21 @@ class HiveThriftBinaryServerSuite extends HiveThriftJdbcTest { assert(conf.get("spark.sql.hive.version") === Some("1.2.1")) } } + + test("SPARK-11043 check operation log root directory") { + val expectLog = "Operation log root directory is created: " + operationLogPath.getAbsoluteFile + val reader = new BufferedReader(new FileReader(logPath)) + var found = false + var line = reader.readLine() + while (!line.isEmpty && !found) { + if (line.contains(expectLog)) { + found = true + } + line = reader.readLine() + } + reader.close() + assert(found) --- End diff -- The following lines should be enough for this test case. ```scala val expectedLine = "Operation log root directory is created: " + operationLogPath.getAbsoluteFile assert(Source.fromFile(logPath).getLines().exists(_.contains(expectedLine))) ```
--- 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