Skip to content

Commit

Permalink
HDDS-2237. KeyDeletingService throws NPE if it's started too early (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
elek authored and bharatviswa504 committed Oct 4, 2019
1 parent 4510970 commit 3f16651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ private KeyManagerImpl(OzoneManager om, ScmClient scmClient,
this.secretManager = secretManager;
this.kmsProvider = kmsProvider;

start(conf);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 3f16651

Please sign in to comment.