HADOOP-9574. Fix for timing issues in the original patch's test-case.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1487722 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
29902cd53c
commit
9ae713ef58
|
@ -342,7 +342,7 @@ public class TestDelegationToken {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void testRollMasterKey() throws Exception {
|
public void testRollMasterKey() throws Exception {
|
||||||
TestDelegationTokenSecretManager dtSecretManager =
|
TestDelegationTokenSecretManager dtSecretManager =
|
||||||
new TestDelegationTokenSecretManager(800,
|
new TestDelegationTokenSecretManager(800,
|
||||||
|
@ -375,10 +375,10 @@ public class TestDelegationToken {
|
||||||
dtSecretManager.retrievePassword(identifier);
|
dtSecretManager.retrievePassword(identifier);
|
||||||
//compare the passwords
|
//compare the passwords
|
||||||
Assert.assertEquals(oldPasswd, newPasswd);
|
Assert.assertEquals(oldPasswd, newPasswd);
|
||||||
// wait for keys to exipire
|
// wait for keys to expire
|
||||||
Thread.sleep(2200);
|
while(!dtSecretManager.isRemoveStoredMasterKeyCalled) {
|
||||||
Assert.assertTrue(dtSecretManager.isRemoveStoredMasterKeyCalled);
|
Thread.sleep(200);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
dtSecretManager.stopThreads();
|
dtSecretManager.stopThreads();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue