imbajin commented on code in PR #357:
URL: 
https://github.com/apache/hugegraph-computer/pull/357#discussion_r3694062223


##########
computer/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/SenderIntegrateTest.java:
##########
@@ -263,14 +276,14 @@ public void testOneWorkerWithBusyClient() {
                                           .withMaxSuperStep(3)
                                           .withComputationClass(COMPUTATION)
                                           .withWorkerCount(1)
-                                          .withWriteBufferHighMark(20)
-                                          .withWriteBufferLowMark(10)
-                                          
.withTransoprtServerPort(transoprtServerPort)
-                                          .build();
-            try (WorkerService service = initWorker(args)) {
-                workerServiceRef.set(service);
+                                        .withTransportServerPort(
+                                         transportServerPort)
+                                        .withTestBspTimeouts()

Review Comment:
   ⚠️ This test no longer forces a busy client: this head removes the worker's 
20/10-byte high/low watermarks and 50/60-byte buffer settings, leaving the 
64/32 MiB and 50 MiB defaults. The tiny fixture and a synchronous 20 ms delay 
can therefore complete without `sendDataMessage()` returning false, so 
regressions in `waitAnyClientNotBusy()` or the send-available wakeup can pass. 
Please restore deterministic low thresholds and assert that the busy/resume 
path occurs, or inject a client that returns false before signaling 
availability.



##########
computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/sender/QueuedMessageSenderTest.java:
##########
@@ -47,21 +60,557 @@ public void setup() {
         );
     }
 
+    private QueuedMessageSender newSender(TransportClient first, 
TransportClient second) {
+        QueuedMessageSender sender = new QueuedMessageSender(this.config);
+        sender.addWorkerClient(1, first);
+        sender.addWorkerClient(2, second);
+        sender.init();
+        return sender;
+    }
+
     @Test
     public void testInitAndClose() {
+        QueuedMessageSender sender = this.newSender(new MockTransportClient(),
+                                                    new MockTransportClient());
+
+        try {
+            Thread sendExecutor = Whitebox.getInternalState(sender,
+                                                            "sendExecutor");
+            Assert.assertTrue(ImmutableSet.of(Thread.State.NEW,
+                                              Thread.State.RUNNABLE,
+                                              Thread.State.WAITING)
+                                          .contains(sendExecutor.getState()));
+        } finally {
+            sender.close();

Review Comment:
   ⚠️ This guarantees that `close()` is invoked but removes the prior assertion 
that the non-daemon `sendExecutor` actually terminates. A regression where 
`close()` returns before the executor exits would now pass and could keep the 
JVM alive. Please retain unconditional cleanup and assert after `close()` that 
the executor is no longer alive or is `TERMINATED`.



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