Browse Source

MAPREDUCE-6088. TestTokenCache tests should use their own JobConf instances. (Zhihai Xu via kasha)

Karthik Kambatla 10 năm trước cách đây
mục cha
commit
c792605805

+ 3 - 0
CHANGES.txt

@@ -248,6 +248,9 @@ Release 1.3.0 - unreleased
     HADOOP-11035. distcp on mr1(branch-1) fails with NPE using a short
     relative source path. (zhihai xu via wang)
 
+    MAPREDUCE-6088. TestTokenCache tests should use their own JobConf 
+    instances. (Zhihai Xu via kasha)
+
 Release 1.2.2 - unreleased
 
   INCOMPATIBLE CHANGES

+ 2 - 1
src/test/org/apache/hadoop/mapreduce/security/TestTokenCache.java

@@ -246,7 +246,8 @@ public class TestTokenCache {
   @Test
   public void testLocalJobTokenCache() throws NoSuchAlgorithmException, IOException {
     // this is local job
-    String[] args = {"-m", "1", "-r", "1", "-mt", "1", "-rt", "1"}; 
+    jConf = mrCluster.createJobConf();
+    String[] args = {"-m", "1", "-r", "1", "-mt", "1", "-rt", "1"};
     jConf.set("mapreduce.job.credentials.json", tokenFileName.toString());
 
     int res = -1;