hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject svn commit: r1377964 - in /hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project: ./ hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/
Date Tue, 28 Aug 2012 03:34:02 GMT
Author: vinodkv
Date: Tue Aug 28 03:34:02 2012
New Revision: 1377964

URL: http://svn.apache.org/viewvc?rev=1377964&view=rev
Log:
YARN-31. Fix TestDelegationTokenRenewer to not depend on test order so as to pass tests on
jdk7. Contributed by Thomas Graves.
svn merge --ignore-ancestry -c 1377961 ../../trunk/

Modified:
    hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java

Modified: hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/CHANGES.txt?rev=1377964&r1=1377963&r2=1377964&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/CHANGES.txt Tue Aug 28 03:34:02
2012
@@ -64,3 +64,6 @@ Release 0.23.3 - Unreleased 
     
     YARN-39. RM-NM secret-keys should be randomly generated and rolled every
     so often. (vinodkv and sseth via sseth)
+
+    YARN-31. Fix TestDelegationTokenRenewer to not depend on test order so as to
+    pass tests on jdk7. (Thomas Graves via vinodkv)

Modified: hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java?rev=1377964&r1=1377963&r2=1377964&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
(original)
+++ hadoop/common/branches/branch-2.1.0-alpha/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
Tue Aug 28 03:34:02 2012
@@ -66,6 +66,12 @@ public class TestDelegationTokenRenewer 
     private static Token<?> lastRenewed = null;
     private static Token<?> tokenToRenewIn2Sec = null;
 
+    private static void reset() {
+      counter = 0;
+      lastRenewed = null;
+      tokenToRenewIn2Sec = null;
+    }
+
     @Override
     public boolean handleKind(Text kind) {
       return KIND.equals(kind);
@@ -124,6 +130,7 @@ public class TestDelegationTokenRenewer 
 
   @Before
   public void setUp() throws Exception {
+    Renewer.reset();
     delegationTokenRenewer = new DelegationTokenRenewer();
     delegationTokenRenewer.init(conf);
     delegationTokenRenewer.start();
@@ -367,7 +374,7 @@ public class TestDelegationTokenRenewer 
 
     Credentials ts = new Credentials();
     MyToken token1 = dfs.getDelegationToken(new Text("user1"));
-    
+
     //to cause this one to be set for renew in 2 secs
     Renewer.tokenToRenewIn2Sec = token1; 
     LOG.info("token="+token1+" should be renewed for 2 secs");



Mime
View raw message