HDDS-2237. KeyDeletingService throws NPE if it's started too early (#1584)

This commit is contained in:
Elek, Márton 2019-10-04 18:48:49 +02:00 committed by Bharat Viswanadham
parent 4510970e2f
commit 3f166512af
2 changed files with 3 additions and 1 deletions

View File

@ -193,7 +193,6 @@ public class KeyManagerImpl implements KeyManager {
this.secretManager = secretManager;
this.kmsProvider = kmsProvider;
start(conf);
}
@Override

View File

@ -95,6 +95,7 @@ public class TestKeyDeletingService {
new KeyManagerImpl(
new ScmBlockLocationTestingClient(null, null, 0),
metaMgr, conf, UUID.randomUUID().toString(), null);
keyManager.start(conf);
final int keyCount = 100;
createAndDeleteKeys(keyManager, keyCount, 1);
KeyDeletingService keyDeletingService =
@ -117,6 +118,7 @@ public class TestKeyDeletingService {
new KeyManagerImpl(
new ScmBlockLocationTestingClient(null, null, 1),
metaMgr, conf, UUID.randomUUID().toString(), null);
keyManager.start(conf);
final int keyCount = 100;
createAndDeleteKeys(keyManager, keyCount, 1);
KeyDeletingService keyDeletingService =
@ -144,6 +146,7 @@ public class TestKeyDeletingService {
new KeyManagerImpl(
new ScmBlockLocationTestingClient(null, null, 1),
metaMgr, conf, UUID.randomUUID().toString(), null);
keyManager.start(conf);
final int keyCount = 100;
createAndDeleteKeys(keyManager, keyCount, 0);
KeyDeletingService keyDeletingService =