coderzc commented on code in PR #286:
URL: 
https://github.com/apache/incubator-hugegraph-computer/pull/286#discussion_r1417348985


##########
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 need to close the worker if master failed, otherwise the main thread 
won't be able to finish.



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