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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]