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/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1377963 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
14b1cf459b
commit
57c4f237e2
|
@ -69,3 +69,6 @@ Release 0.23.3 - Unreleased
|
||||||
|
|
||||||
YARN-39. RM-NM secret-keys should be randomly generated and rolled every
|
YARN-39. RM-NM secret-keys should be randomly generated and rolled every
|
||||||
so often. (vinodkv and sseth via sseth)
|
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)
|
||||||
|
|
|
@ -66,6 +66,12 @@ public class TestDelegationTokenRenewer {
|
||||||
private static Token<?> lastRenewed = null;
|
private static Token<?> lastRenewed = null;
|
||||||
private static Token<?> tokenToRenewIn2Sec = null;
|
private static Token<?> tokenToRenewIn2Sec = null;
|
||||||
|
|
||||||
|
private static void reset() {
|
||||||
|
counter = 0;
|
||||||
|
lastRenewed = null;
|
||||||
|
tokenToRenewIn2Sec = null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handleKind(Text kind) {
|
public boolean handleKind(Text kind) {
|
||||||
return KIND.equals(kind);
|
return KIND.equals(kind);
|
||||||
|
@ -124,6 +130,7 @@ public class TestDelegationTokenRenewer {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
|
Renewer.reset();
|
||||||
delegationTokenRenewer = new DelegationTokenRenewer();
|
delegationTokenRenewer = new DelegationTokenRenewer();
|
||||||
delegationTokenRenewer.init(conf);
|
delegationTokenRenewer.init(conf);
|
||||||
delegationTokenRenewer.start();
|
delegationTokenRenewer.start();
|
||||||
|
|
Loading…
Reference in New Issue