wangzhigang1999 commented on code in PR #7854:
URL: https://github.com/apache/kyuubi/pull/7854#discussion_r4510057589
##########
externals/kyuubi-hive-sql-engine/src/test/scala/org/apache/kyuubi/engine/hive/event/HiveEventLoggingServiceSuite.scala:
##########
@@ -37,9 +35,25 @@ class HiveEventLoggingServiceSuite extends
HiveJDBCTestHelper {
private val kyuubiConf = new KyuubiConf()
private val logRoot = kyuubiConf.get(ENGINE_EVENT_JSON_LOG_PATH)
- private val currentDate =
Utils.getDateFromTimestamp(System.currentTimeMillis())
private val hostName = InetAddress.getLocalHost.getCanonicalHostName
+ // Read every day partition so the test does not depend on the date the
suite was constructed,
+ // which can differ from the date the events are written if a run crosses
midnight.
+ private def readEventLines(eventType: String): Seq[String] = {
Review Comment:
Could we extract the three copies of `readEventLines` into a shared test
helper, such as `TestUtils` in `kyuubi-common`? All three modules already
depend on its test JAR. We could pass the file pattern as a parameter and keep
the event parsing and assertions in each suite.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]