Copilot commented on code in PR #7509:
URL: https://github.com/apache/kyuubi/pull/7509#discussion_r3403024840


##########
kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefTests.scala:
##########
@@ -298,6 +298,7 @@ trait EngineRefTests extends KyuubiFunSuite {
     eventually(timeout(90.seconds), interval(1.second)) {
       assert(port1 != 0, "engine started")
       assert(port2 == port1, "engine shared")
+      
assert(MetricsSystem.histogramSnapshot(ENGINE_STARTUP_TIME).exists(_.size() > 
0))
     }

Review Comment:
   This assertion can become a false positive if any earlier test in the same 
JVM already updated `kyuubi.engine.startup.time` (the histogram is global to 
the suite’s shared `MetricsSystem`). It’s more robust to capture the histogram 
sample count before starting the threads and assert it increases after 
`getOrCreate` succeeds.



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

Reply via email to