HDDS-2237. KeyDeletingService throws NPE if it's started too early (#1584)
This commit is contained in:
parent
4510970e2f
commit
3f166512af
@ -193,7 +193,6 @@ private KeyManagerImpl(OzoneManager om, ScmClient scmClient,
|
||||
this.secretManager = secretManager;
|
||||
this.kmsProvider = kmsProvider;
|
||||
|
||||
start(conf);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -95,6 +95,7 @@ public void checkIfDeleteServiceisDeletingKeys()
|
||||
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 void checkIfDeleteServiceWithFailingSCM()
|
||||
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 void checkDeletionForEmptyKey()
|
||||
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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user