You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "homatthew (via GitHub)" <gi...@apache.org> on 2023/06/21 19:43:38 UTC

[GitHub] [gobblin] homatthew commented on a diff in pull request #3709: [GOBBLIN-1844] Ignore workflows marked for deletion when calculating …

homatthew commented on code in PR #3709:
URL: https://github.com/apache/gobblin/pull/3709#discussion_r1237601115


##########
gobblin-yarn/src/test/java/org/apache/gobblin/yarn/YarnAutoScalingManagerTest.java:
##########
@@ -223,117 +150,64 @@ public void testTwoWorkflows() throws IOException {
     runnable.run();
 
     // 5 containers requested and 3 workers in use
-    ArgumentCaptor<YarnContainerRequestBundle> argument = ArgumentCaptor.forClass(YarnContainerRequestBundle.class);
-    Mockito.verify(mockYarnService, times(1)).
-        requestTargetNumberOfContainers(argument.capture(),
-            eq(ImmutableSet.of("GobblinYarnTaskRunner-1", "GobblinYarnTaskRunner-2", "GobblinYarnTaskRunner-3")));
-    Assert.assertEquals(argument.getValue().getTotalContainers(), 5);
+    assertContainerRequest(mockYarnService, 5,
+        ImmutableSet.of("GobblinYarnTaskRunner-1", "GobblinYarnTaskRunner-2", "GobblinYarnTaskRunner-3"));
   }
 
   /**
-   * Test for two workflows with one not in progress.
-   * The partitions for the workflow that is not in progress should not be counted.
+   * Test for three workflows with one not in progress and one marked for delete.
+   * The partitions for the workflow that is not in progress or is marked for delete should not be counted.
    */
   @Test
-  public void testNotInProgress() throws IOException {
+  public void testNotInProgressOrBeingDeleted()  {

Review Comment:
   This is the test that covers the related `impl` changes. The changes in the other test methods are all refactors 



-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org