YARN-2810. TestRMProxyUsersConf fails on Windows VMs. Contributed by Varun Vasudev
This commit is contained in:
parent
a5657182a7
commit
1e97f2f094
|
@ -892,6 +892,8 @@ Release 2.6.0 - UNRELEASED
|
||||||
schedulers about previous finished attempts of a running appliation to avoid
|
schedulers about previous finished attempts of a running appliation to avoid
|
||||||
expectation mismatch w.r.t transferred containers. (Jian He via vinodkv)
|
expectation mismatch w.r.t transferred containers. (Jian He via vinodkv)
|
||||||
|
|
||||||
|
YARN-2810. TestRMProxyUsersConf fails on Windows VMs. (Varun Vasudev via xgong)
|
||||||
|
|
||||||
Release 2.5.2 - UNRELEASED
|
Release 2.5.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -38,6 +38,7 @@ public class TestRMProxyUsersConf {
|
||||||
UserGroupInformation.createUserForTesting("foo", new String[] { "foo_group" });
|
UserGroupInformation.createUserForTesting("foo", new String[] { "foo_group" });
|
||||||
private static final UserGroupInformation BAR_USER =
|
private static final UserGroupInformation BAR_USER =
|
||||||
UserGroupInformation.createUserForTesting("bar", new String[] { "bar_group" });
|
UserGroupInformation.createUserForTesting("bar", new String[] { "bar_group" });
|
||||||
|
private final String ipAddress = "127.0.0.1";
|
||||||
|
|
||||||
@Parameterized.Parameters
|
@Parameterized.Parameters
|
||||||
public static Collection<Object[]> headers() {
|
public static Collection<Object[]> headers() {
|
||||||
|
@ -51,13 +52,13 @@ public class TestRMProxyUsersConf {
|
||||||
switch (round) {
|
switch (round) {
|
||||||
case 0:
|
case 0:
|
||||||
// hadoop.proxyuser prefix
|
// hadoop.proxyuser prefix
|
||||||
conf.set("hadoop.proxyuser.foo.hosts", "localhost");
|
conf.set("hadoop.proxyuser.foo.hosts", ipAddress);
|
||||||
conf.set("hadoop.proxyuser.foo.users", "bar");
|
conf.set("hadoop.proxyuser.foo.users", "bar");
|
||||||
conf.set("hadoop.proxyuser.foo.groups", "bar_group");
|
conf.set("hadoop.proxyuser.foo.groups", "bar_group");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// yarn.resourcemanager.proxyuser prefix
|
// yarn.resourcemanager.proxyuser prefix
|
||||||
conf.set("yarn.resourcemanager.proxyuser.foo.hosts", "localhost");
|
conf.set("yarn.resourcemanager.proxyuser.foo.hosts", ipAddress);
|
||||||
conf.set("yarn.resourcemanager.proxyuser.foo.users", "bar");
|
conf.set("yarn.resourcemanager.proxyuser.foo.users", "bar");
|
||||||
conf.set("yarn.resourcemanager.proxyuser.foo.groups", "bar_group");
|
conf.set("yarn.resourcemanager.proxyuser.foo.groups", "bar_group");
|
||||||
break;
|
break;
|
||||||
|
@ -67,7 +68,7 @@ public class TestRMProxyUsersConf {
|
||||||
conf.set("hadoop.proxyuser.foo.hosts", "xyz");
|
conf.set("hadoop.proxyuser.foo.hosts", "xyz");
|
||||||
conf.set("hadoop.proxyuser.foo.users", "xyz");
|
conf.set("hadoop.proxyuser.foo.users", "xyz");
|
||||||
conf.set("hadoop.proxyuser.foo.groups", "xyz");
|
conf.set("hadoop.proxyuser.foo.groups", "xyz");
|
||||||
conf.set("yarn.resourcemanager.proxyuser.foo.hosts", "localhost");
|
conf.set("yarn.resourcemanager.proxyuser.foo.hosts", ipAddress);
|
||||||
conf.set("yarn.resourcemanager.proxyuser.foo.users", "bar");
|
conf.set("yarn.resourcemanager.proxyuser.foo.users", "bar");
|
||||||
conf.set("yarn.resourcemanager.proxyuser.foo.groups", "bar_group");
|
conf.set("yarn.resourcemanager.proxyuser.foo.groups", "bar_group");
|
||||||
break;
|
break;
|
||||||
|
@ -89,7 +90,7 @@ public class TestRMProxyUsersConf {
|
||||||
BAR_USER.getShortUserName(), FOO_USER);
|
BAR_USER.getShortUserName(), FOO_USER);
|
||||||
try {
|
try {
|
||||||
ProxyUsers.getDefaultImpersonationProvider().authorize(proxyUser,
|
ProxyUsers.getDefaultImpersonationProvider().authorize(proxyUser,
|
||||||
"localhost");
|
ipAddress);
|
||||||
} catch (AuthorizationException e) {
|
} catch (AuthorizationException e) {
|
||||||
// Exception is not expected
|
// Exception is not expected
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
|
|
Loading…
Reference in New Issue