MAPREDUCE-7135. TestTaskAttemptContainerRequest should reset UserGroupInformation. Contributed by Oleksandr Shevchenko
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7ce997af Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7ce997af Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7ce997af Branch: refs/heads/YARN-3409 Commit: 7ce997af97e165e963eb44cd520f16a1f808d9a5 Parents: 4b8c2b1 Author: Jason Lowe <[email protected]> Authored: Tue Sep 11 11:16:33 2018 -0500 Committer: Jason Lowe <[email protected]> Committed: Tue Sep 11 11:16:33 2018 -0500 ---------------------------------------------------------------------- .../v2/app/job/impl/TestTaskAttemptContainerRequest.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/7ce997af/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttemptContainerRequest.java ---------------------------------------------------------------------- diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttemptContainerRequest.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttemptContainerRequest.java index b151c8a..585b949 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttemptContainerRequest.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttemptContainerRequest.java @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import org.junit.After; import org.junit.Assert; import org.apache.hadoop.fs.CommonConfigurationKeysPublic; @@ -62,12 +63,10 @@ import org.junit.Test; @SuppressWarnings({"rawtypes"}) public class TestTaskAttemptContainerRequest { - //WARNING: This test must be the only test in this file. This is because - // there is an optimization where the credentials passed in are cached - // statically so they do not need to be recomputed when creating a new - // ContainerLaunchContext. if other tests run first this code will cache - // their credentials and this test will fail trying to look for the - // credentials it inserted in. + @After + public void cleanup() { + UserGroupInformation.reset(); + } @Test public void testAttemptContainerRequest() throws Exception { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
