turboFei commented on code in PR #3233:
URL: https://github.com/apache/incubator-kyuubi/pull/3233#discussion_r948575884
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala:
##########
@@ -59,6 +62,13 @@ class BatchRestApiSuite extends RestClientTestHelper with
BatchTestHelper {
}
test("basic batch rest client with invalid user") {
+ val totalConnections =
+
MetricsSystem.counterValue(MetricsConstants.REST_CONN_TOTAL).getOrElse(0L)
+ val openConnections =
+ MetricsSystem.counterValue(MetricsConstants.REST_CONN_OPEN).getOrElse(0L)
Review Comment:
remove
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala:
##########
@@ -75,6 +85,15 @@ class BatchRestApiSuite extends RestClientTestHelper with
BatchTestHelper {
assert(e.getCause.toString.contains(s"Error validating LDAP user:
uid=${customUser}"))
basicKyuubiRestClient.close()
+
+ eventually(timeout(3.seconds), interval(200.milliseconds)) {
+ assert(MetricsSystem.counterValue(
+ MetricsConstants.REST_CONN_TOTAL).getOrElse(0L) - totalConnections ===
1)
+ assert(MetricsSystem.counterValue(
+ MetricsConstants.REST_CONN_OPEN).getOrElse(0L) - openConnections === 0)
+ assert(MetricsSystem.counterValue(
Review Comment:
assert(MetricsSystem.counterValue(MetricsConstants.REST_CONN_OPEN).getOrElse(0L)
=== 0)
--
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]