phet commented on code in PR #3858:
URL: https://github.com/apache/gobblin/pull/3858#discussion_r1518418022


##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagProcessingEngineTest.java:
##########
@@ -150,12 +162,19 @@ protected void commit(DagManagementStateStore 
dagManagementStateStore, Void resu
     }
   }
 
-  // This tests verifies that
+  // This tests verifies that all the dag tasks entered to the dag task stream 
are retrieved by dag proc engine threads
   @Test
   public void dagProcessingTest() throws InterruptedException, 
TimeoutException {
+    // there are MAX_NUM_OF_TASKS dag tasks returned and then each thread 
additionally call (infinitely) once to wait
+    // in this unit tests, it does not infinitely wait though, because the 
mocked task stream throws an exception on
+    // (MAX_NUM_OF_TASKS + 1) th call
     int expectedNumOfInvocations = MockedDagTaskStream.MAX_NUM_OF_TASKS + 
ServiceConfigKeys.DEFAULT_NUM_DAG_PROC_THREADS;
+    int expectedExceptions = MockedDagTaskStream.MAX_NUM_OF_TASKS / 
MockedDagTaskStream.FAILING_DAGS_FREQUENCY;

Review Comment:
   this will change back to `MAX_TASKS + numDPEThreads` when the exception is 
thrown by `DagProc::act`.
   
   but why however is it not 2x that many invocations, given we've both 
`hasNext()` and `next()`?



##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/DagProcessingEngineTest.java:
##########
@@ -150,12 +162,19 @@ protected void commit(DagManagementStateStore 
dagManagementStateStore, Void resu
     }
   }
 
-  // This tests verifies that
+  // This tests verifies that all the dag tasks entered to the dag task stream 
are retrieved by dag proc engine threads
   @Test
   public void dagProcessingTest() throws InterruptedException, 
TimeoutException {
+    // there are MAX_NUM_OF_TASKS dag tasks returned and then each thread 
additionally call (infinitely) once to wait
+    // in this unit tests, it does not infinitely wait though, because the 
mocked task stream throws an exception on
+    // (MAX_NUM_OF_TASKS + 1) th call
     int expectedNumOfInvocations = MockedDagTaskStream.MAX_NUM_OF_TASKS + 
ServiceConfigKeys.DEFAULT_NUM_DAG_PROC_THREADS;
+    int expectedExceptions = MockedDagTaskStream.MAX_NUM_OF_TASKS / 
MockedDagTaskStream.FAILING_DAGS_FREQUENCY;

Review Comment:
   this will change back to `MAX_TASKS + numDPEThreads` when the exception is 
thrown by `DagProc::act`.
   
   ...but why however is it not 2x that many invocations, given we've both 
`hasNext()` and `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]

Reply via email to