MAPREDUCE-7135. TestTaskAttemptContainerRequest should reset UserGroupInformation. Contributed by Oleksandr Shevchenko
This commit is contained in:
parent
4b8c2b1c1c
commit
7ce997af97
|
@ -27,6 +27,7 @@ import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.junit.After;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
|
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||||
|
@ -62,12 +63,10 @@ import org.junit.Test;
|
||||||
@SuppressWarnings({"rawtypes"})
|
@SuppressWarnings({"rawtypes"})
|
||||||
public class TestTaskAttemptContainerRequest {
|
public class TestTaskAttemptContainerRequest {
|
||||||
|
|
||||||
//WARNING: This test must be the only test in this file. This is because
|
@After
|
||||||
// there is an optimization where the credentials passed in are cached
|
public void cleanup() {
|
||||||
// statically so they do not need to be recomputed when creating a new
|
UserGroupInformation.reset();
|
||||||
// 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.
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAttemptContainerRequest() throws Exception {
|
public void testAttemptContainerRequest() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue