YARN-852. TestAggregatedLogFormat.testContainerLogsFileAccess fails on Windows. Contributed by Chuan Liu.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1494733 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ed2c56421c
commit
51c85ca067
|
@ -677,6 +677,9 @@ Release 2.1.0-beta - UNRELEASED
|
|||
YARN-597. TestFSDownload fails on Windows due to dependencies on
|
||||
tar/gzip/jar tools. (Ivan Mitic via acmurthy)
|
||||
|
||||
YARN-852. TestAggregatedLogFormat.testContainerLogsFileAccess fails on
|
||||
Windows. (Chuan Liu via cnauroth)
|
||||
|
||||
YARN-795. Fair scheduler queue metrics should subtract allocated vCores from
|
||||
available vCores. (ywskycn via tucu)
|
||||
|
||||
|
|
|
@ -206,27 +206,34 @@ public class TestAggregatedLogFormat {
|
|||
sb.append(line);
|
||||
}
|
||||
line = sb.toString();
|
||||
|
||||
|
||||
String expectedOwner = ugi.getShortUserName();
|
||||
if (Path.WINDOWS) {
|
||||
final String adminsGroupString = "Administrators";
|
||||
if (Arrays.asList(ugi.getGroupNames()).contains(adminsGroupString)) {
|
||||
expectedOwner = adminsGroupString;
|
||||
}
|
||||
}
|
||||
String stdoutFile1 =
|
||||
StringUtils.join(
|
||||
Path.SEPARATOR,
|
||||
File.separator,
|
||||
Arrays.asList(new String[] {
|
||||
srcFileRoot.toUri().toString(),
|
||||
workDir.getAbsolutePath(), "srcFiles",
|
||||
testContainerId1.getApplicationAttemptId().getApplicationId()
|
||||
.toString(), testContainerId1.toString(), stderr }));
|
||||
String message1 =
|
||||
"Owner '" + ugi.getShortUserName() + "' for path " + stdoutFile1
|
||||
"Owner '" + expectedOwner + "' for path " + stdoutFile1
|
||||
+ " did not match expected owner '" + randomUser + "'";
|
||||
|
||||
String stdoutFile2 =
|
||||
StringUtils.join(
|
||||
Path.SEPARATOR,
|
||||
File.separator,
|
||||
Arrays.asList(new String[] {
|
||||
srcFileRoot.toUri().toString(),
|
||||
workDir.getAbsolutePath(), "srcFiles",
|
||||
testContainerId1.getApplicationAttemptId().getApplicationId()
|
||||
.toString(), testContainerId1.toString(), stdout }));
|
||||
String message2 =
|
||||
"Owner '" + ugi.getShortUserName() + "' for path "
|
||||
"Owner '" + expectedOwner + "' for path "
|
||||
+ stdoutFile2 + " did not match expected owner '"
|
||||
+ ugi.getShortUserName() + "'";
|
||||
|
||||
|
|
Loading…
Reference in New Issue