phet commented on code in PR #3960:
URL: https://github.com/apache/gobblin/pull/3960#discussion_r1623063819
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagementTaskStreamImpl.java:
##########
@@ -146,7 +147,7 @@ public DagTask next() {
}
} catch (Exception e) {
//TODO: need to handle exceptions gracefully
- log.error("Exception getting DagAction from the queue / creating
DagTask", e);
+ log.error("Exception getting DagAction from the queue / creating
DagTask {}", dagAction == null ? "" : dagAction, e);
Review Comment:
wouldn't it just print the string `null`? seems clearer and more helpful
indicator when debugging than is empty string
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/LaunchDagProc.java:
##########
@@ -83,6 +83,7 @@ protected void act(DagManagementStateStore
dagManagementStateStore, Optional<Dag
submitNextNodes(dagManagementStateStore, dag.get());
//Checkpoint the dag state, it should have an updated value of dag nodes
Review Comment:
nit - start comment w/ space
##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/proc/LaunchDagProcTest.java:
##########
@@ -97,6 +99,11 @@ public void launchDag()
Assert.assertEquals(expectedNumOfSavingDagNodeStates,
Mockito.mockingDetails(this.dagManagementStateStore).getInvocations().stream()
.filter(a ->
a.getMethod().getName().equals("addDagNodeState")).count());
+
+ List<Invocation> invocations =
Mockito.mockingDetails(this.dagManagementStateStore).getInvocations().stream()
+ .filter(a ->
a.getMethod().getName().equals("addFlowDagAction")).collect(Collectors.toList());
+ Assert.assertEquals(invocations.size(), 1);
+ Assert.assertEquals(invocations.get(0).getArguments()[3],
DagActionStore.DagActionType.ENFORCE_FLOW_FINISH_DEADLINE);
Review Comment:
doesn't it work to use:
```
Mockito.verify(this.dagManagementStateStore,
Mockito.times(1)).addFlowDagAction(any(), any(), any(),
eq(DAS.DAT.ENFORECE_FLOW_FINISH_DEADLINE));
```
?
--
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]