arjun4084346 commented on code in PR #3858:
URL: https://github.com/apache/gobblin/pull/3858#discussion_r1518427757
##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagProcessingEngineTest.java:
##########
@@ -102,34 +102,43 @@ public boolean hasNext() {
}
@Override
- public synchronized DagTask next() {
+ public synchronized DagTask next() throws NoSuchElementException {
i++;
- if (i <= MAX_NUM_OF_TASKS) {
- return new MockedDagTask(new DagActionStore.DagAction("fg-" + i, "fn-"
+ i, "1234" + i, DagActionStore.FlowActionType.LAUNCH), null);
+ if (i > MAX_NUM_OF_TASKS) {
+ throw new RuntimeException("Simulating an exception to stop the
thread!");
Review Comment:
if the test throws exception in MockedDagProc.act , thread will not stop....
i just wanted to stop the DPE thread, though it is not required...
DagProcEngineThread is written in such a way that it will swallow exceptions
(with logging) thrown by dag procs, but will die on any exception in
dagTaskStream.next()
--
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]