imbajin commented on code in PR #286:
URL:
https://github.com/apache/incubator-hugegraph-computer/pull/286#discussion_r1418569975
##########
computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerServiceTest.java:
##########
@@ -207,24 +189,21 @@ public void testServiceWith2Workers() throws
InterruptedException {
ComputerOptions.ALGORITHM_MESSAGE_CLASS,
DoubleValue.class.getName()
);
- MasterService masterService = new MasterService();
- try {
+ try (MasterService masterService = new MasterService()) {
masterService.init(config);
masterService.execute();
} catch (Throwable e) {
LOG.error("Failed to start master", e);
exceptions[2] = e;
} finally {
- masterService.close();
countDownLatch.countDown();
Review Comment:
> We can call workerService.close()
but in this case we can't call it because of the worker service **scope** is
not shared/enough (In other case we could do that)
##########
computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerServiceTest.java:
##########
@@ -207,24 +189,21 @@ public void testServiceWith2Workers() throws
InterruptedException {
ComputerOptions.ALGORITHM_MESSAGE_CLASS,
DoubleValue.class.getName()
);
- MasterService masterService = new MasterService();
- try {
+ try (MasterService masterService = new MasterService()) {
masterService.init(config);
masterService.execute();
} catch (Throwable e) {
LOG.error("Failed to start master", e);
exceptions[2] = e;
} finally {
- masterService.close();
countDownLatch.countDown();
Review Comment:
> We can call workerService.close()
but in this case we can't call it because the worker service **scope** is
not shared/enough (In other case we could do that)
--
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]