imbajin commented on code in PR #357:
URL:
https://github.com/apache/hugegraph-computer/pull/357#discussion_r3696134114
##########
computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/worker/WorkerServiceTest.java:
##########
@@ -232,6 +235,18 @@ public void testFailToConnectEtcd() {
}
}
+ @Test
+ public void testCloseSendsWorkerCloseDoneWhenRegisteredButNotInited() {
+ WorkerService service = new WorkerService();
+ Bsp4Worker bsp4Worker = Mockito.mock(Bsp4Worker.class);
+ Whitebox.setInternalState(service, "bsp4Worker", bsp4Worker);
+ Whitebox.setInternalState(service, "registered", true);
Review Comment:
⚠️ This test forces `registered` to `true` through Whitebox, so it still
passes if the production assignment after `workerInitDone()` is removed or
moved beyond a failing initialization step. That would reintroduce the missing
`workerCloseDone()` signal when `connectToWorkers()` or `managers.initedAll()`
fails. Please exercise the real registration transition through an
injectable/mock BSP seam, fail immediately after registration, then close and
verify `workerCloseDone()`; the regression should fail if the production
`registered = true` assignment is deleted.
--
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]