Blazer-007 commented on code in PR #4092:
URL: https://github.com/apache/gobblin/pull/4092#discussion_r1945970202


##########
gobblin-temporal/src/test/java/org/apache/gobblin/temporal/yarn/DynamicScalingYarnServiceManagerTest.java:
##########
@@ -69,14 +69,14 @@ public void testWhenScalingDirectivesIsNulOrEmpty() throws 
IOException, Interrup
   /** Note : this test uses {@link DummyScalingDirectiveSource}*/
   @Test
   public void testWithDummyScalingDirectiveSource() throws IOException, 
InterruptedException {
-    // DummyScalingDirectiveSource returns 2 scaling directives in first 3 
invocations and after that it returns empty list
-    // so the total number of invocations after three invocations should 
always be 3
+    // DummyScalingDirectiveSource returns 2 scaling directives in first 5 
invocations and after that it returns empty list
+    // so the total number of invocations after three invocations should 
always be 5
     TestDynamicScalingYarnServiceManager testDynamicScalingYarnServiceManager 
= new TestDynamicScalingYarnServiceManager(
         mockGobblinTemporalApplicationMaster, new 
DummyScalingDirectiveSource());
     testDynamicScalingYarnServiceManager.startUp();
-    Thread.sleep(5000); // 5 seconds sleep so that 
GetScalingDirectivesRunnable.run() is called for 5 times
+    Thread.sleep(7000); // 5 seconds sleep so that 
GetScalingDirectivesRunnable.run() is called for 7 times

Review Comment:
   `GetScalingDirectivesRunnable.run()` currently runs every second so for each 
second run it gets scalingDirectives if returned from ScalingDirectiveSource 
Impl which in our case `DummyScalingDirectiveSource` returns scaling directives 
for 5 times so 7 second to check if it is not returning more than 5 times even 
if runnable keeps running



-- 
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-unsubscr...@gobblin.apache.org

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

Reply via email to