You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/09/16 06:41:22 UTC

[GitHub] [hadoop] ayushtkn commented on a diff in pull request #4893: YARN-11305. Fix TestLogAggregationService#testLocalFileDeletionAfterUpload Failed After YARN-11241(#4703).

ayushtkn commented on code in PR #4893:
URL: https://github.com/apache/hadoop/pull/4893#discussion_r972661977


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/TestLogAggregationService.java:
##########
@@ -252,7 +252,7 @@ private void verifyLocalFileDeletion(
         count = 0;
         while ((f.exists()) && (count < maxAttempts)) {
           count++;
-          Thread.sleep(100);
+          Thread.sleep(1000);

Review Comment:
   Is there some scope to change this hard-coded sleep with ``GenericTestUtils.waitFor``?



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/logaggregation/TestLogAggregationService.java:
##########
@@ -324,7 +324,7 @@ public void testLocalFileRemainsAfterUploadOnCleanupDisable() throws Exception {
         this.remoteRootLogDir.getAbsolutePath());
     LogAggregationService logAggregationService = spy(
         new LogAggregationService(dispatcher, this.context, this.delSrvc, super.dirsHandler));
-    verifyLocalFileDeletion(logAggregationService);
+    verifyLocalFileDeletion(logAggregationService, 4321L);

Review Comment:
   Is there some logic behind these numbers? If not I think we should generate random numbers instead, else someone adding a new tests, unaware of these numbers will landup into the same mess. But I am ok to do the present way if others feel this is better approach 
   



-- 
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: common-issues-unsubscribe@hadoop.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org