From caa6260d1244fcacf1f61111dd7e8558b1fbf34c Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Mon, 14 Apr 2014 23:43:53 +0000 Subject: [PATCH] HADOOP-10500. TestDoAsEffectiveUser fails on JDK7 due to failure to reset proxy user configuration. Contributed by Chris Nauroth. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1587361 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../org/apache/hadoop/security/TestDoAsEffectiveUser.java | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index bb7a10de341..25109cea5ae 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -385,6 +385,9 @@ Release 2.5.0 - UNRELEASED HADOOP-10496. Metrics system FileSink can leak file descriptor. (cnauroth) + HADOOP-10500. TestDoAsEffectiveUser fails on JDK7 due to failure to reset + proxy user configuration. (cnauroth) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestDoAsEffectiveUser.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestDoAsEffectiveUser.java index 830106dcee2..e546e4c93fa 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestDoAsEffectiveUser.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestDoAsEffectiveUser.java @@ -74,8 +74,9 @@ public class TestDoAsEffectiveUser { } @Before - public void setMasterConf() { + public void setMasterConf() throws IOException { UserGroupInformation.setConfiguration(masterConf); + refreshConf(masterConf); } private void configureSuperUserIPAddresses(Configuration conf, @@ -297,6 +298,8 @@ public class TestDoAsEffectiveUser { .setInstance(new TestImpl()).setBindAddress(ADDRESS).setPort(0) .setNumHandlers(2).setVerbose(false).build(); + refreshConf(conf); + try { server.start(); @@ -379,6 +382,8 @@ public class TestDoAsEffectiveUser { .setInstance(new TestImpl()).setBindAddress(ADDRESS).setPort(0) .setNumHandlers(2).setVerbose(false).build(); + refreshConf(conf); + try { server.start();