afterincomparableyum commented on code in PR #3737:
URL: https://github.com/apache/celeborn/pull/3737#discussion_r3489445170


##########
worker/src/test/scala/org/apache/celeborn/service/deploy/worker/monitor/JVMQuakeSuite.scala:
##########
@@ -53,28 +45,19 @@ class JVMQuakeSuite extends CelebornFunSuite {
       .set(WORKER_JVM_QUAKE_RUNTIME_WEIGHT.key, "1")
       .set(WORKER_JVM_QUAKE_DUMP_THRESHOLD.key, "1s")
       .set(WORKER_JVM_QUAKE_KILL_THRESHOLD.key, "2s"))
-    quake.start()
-    allocateMemory(quake)
-    quake.stop()
+
+    // Drive the GC "deficit" bucket deterministically rather than inducing 
real GC pressure:
+    // feed a GC-time delta above the 1s dump threshold with no offsetting 
execution time, so the
+    // heap dump is triggered exactly once. The previous version spun until 
real GC happened to
+    // trip the threshold, which could (and did) hang indefinitely when the 
runner had enough
+    // headroom that GC pauses never dominated runtime.
+    assert(!quake.heapDumped)
+    quake.checkAndDump(TimeUnit.SECONDS.toNanos(2), 0L)

Review Comment:
   good catch, I will add a start()/stop() lifecycle test



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