zhenjiaguo commented on a change in pull request #1378:
URL: https://github.com/apache/incubator-kyuubi/pull/1378#discussion_r754744500



##########
File path: 
kyuubi-server/src/test/scala/org/apache/kyuubi/events/EventLoggingServiceSuite.scala
##########
@@ -149,4 +154,76 @@ class EventLoggingServiceSuite extends WithKyuubiServer 
with HiveJDBCTestHelper
       }
     }
   }
+
+  test("test Kyuubi server info event") {
+    val confKv = List(("awesome.kyuubi", "true"), ("awesome.kyuubi.server", 
"yeah"))
+    for (kv <- confKv) {
+      conf.set(kv._1, kv._2)
+    }
+    val name = "KyuubiServerInfoTest"
+    val server = new KyuubiServer(name)
+    server.initialize(conf)
+    server.start()
+
+    val hostName = InetAddress.getLocalHost.getCanonicalHostName
+    val kyuubiServerStartEventPath =
+      Paths.get(serverLogRoot, "kyuubi_server_info", s"day=$currentDate", 
s"server-$hostName.json")
+
+    def compareResultWithState(state: String, result: ResultSet): Unit = {
+      result.next()
+      assert(result.getString("serverName") == name)
+      result.next()

Review comment:
       One row, one event. When we query one row as `ResultSet`, we need to use 
`result.next()` to get next col in the `ResultSet`.




-- 
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]


Reply via email to