[
https://issues.apache.org/jira/browse/YARN-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15382001#comment-15382001
]
Rohith Sharma K S commented on YARN-5213:
-----------------------------------------
I looked at the test case for randomness, basically test
{{testFetchFinishedApplictionLogs}} usually failing in Ubuntu but not either in
Windows OR Mac. The reason is test is expecting whenever container logs files
are read, log files are listed in order which LogCliHelper print on console.
The test-case reads it and try to do assertion. But
{{FileContext.getFileContext(qualifiedLogDir.toUri(),
getConf()).listStatus(remoteAppLogDir)}} RemoteIterator does not guaranty that
iterator is in-order. As a result, printing on console might get randomized for
the log files.
Test failing randomly because test always assert content from specific offset
which might go on toss
{code}
Assert.assertEquals(new String(logMessage.getBytes(), 0, 5),
new String(sysOutStream.toByteArray(),
(fullContextSize - fileContentSize - tailContentSize), 5));
{code}
> TestLogsCLI#testFetchApplictionLogs fails intermittently
> --------------------------------------------------------
>
> Key: YARN-5213
> URL: https://issues.apache.org/jira/browse/YARN-5213
> Project: Hadoop YARN
> Issue Type: Test
> Components: test
> Reporter: Rohith Sharma K S
> Assignee: Rohith Sharma K S
>
> TestLogsCLI fails intermittently on build
> [link|https://builds.apache.org/job/PreCommit-YARN-Build/11910/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-client.txt]
> {noformat}
> Running org.apache.hadoop.yarn.client.cli.TestLogsCLI
> Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.708 sec
> <<< FAILURE! - in org.apache.hadoop.yarn.client.cli.TestLogsCLI
> testFetchApplictionLogs(org.apache.hadoop.yarn.client.cli.TestLogsCLI) Time
> elapsed: 0.176 sec <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[Hello]> but was:<[=====]>
> at org.junit.Assert.assertEquals(Assert.java:115)
> at org.junit.Assert.assertEquals(Assert.java:144)
> at
> org.apache.hadoop.yarn.client.cli.TestLogsCLI.testFetchApplictionLogs(TestLogsCLI.java:389)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]