imbajin commented on code in PR #357:
URL:
https://github.com/apache/hugegraph-computer/pull/357#discussion_r3664814368
##########
computer/computer-test/src/main/java/org/apache/hugegraph/computer/suite/integrate/SenderIntegrateTest.java:
##########
@@ -81,18 +305,27 @@ public void testOneWorker() {
.withResultClass(DoubleValue.class)
.withMessageClass(DoubleValue.class)
.withMaxSuperStep(3)
- .withComputationClass(COMPUTATION)
- .withWorkerCount(1)
- .withBufferThreshold(50)
+ .withComputationClass(COMPUTATION)
+ .withWorkerCount(1)
+ .withTestBspTimeouts()
+ .withBufferThreshold(50)
.withBufferCapacity(60)
.withRpcServerHost("127.0.0.1")
.withRpcServerPort(8611)
.withRpcServerPort(0)
.build();
- try (MasterService service = initMaster(args)) {
- masterServiceRef.set(service);
- service.execute();
- masterFuture.complete(null);
+ try {
+ MasterService service = initMaster(args);
+ try {
+ if (!lifecycle.registerMaster(service::close)) {
+ masterFuture.cancel(false);
+ return;
+ }
+ service.execute();
+ masterFuture.complete(null);
+ } finally {
+ closeMaster(service);
+ }
} catch (Exception e) {
Review Comment:
⚠️ `initializeService()` explicitly rethrows `Error` after cleanup (lines
602-608), but this master thread only catches `Exception`. An `Error` from
`initMaster()`, `execute()`, or `closeMaster()` therefore terminates the daemon
thread without completing `masterFuture`; `waitForServices()` reports only a
generic timeout after 310 seconds. Please catch `Throwable` here, as the other
service threads do, complete `masterFuture` exceptionally with the original
cause, and add a focused regression where the master task throws an `Error` and
fails immediately.
--
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]