Amend HBASE-27194 Add test coverage for SimpleRpcServer (#4616)

When backporting to branch-2 it was discovered that the order of tear
down operations requires the KDC to be torn down first, although on
master branch the original code did not produce the same errors (a NPE
in KDC#stop). Forward port the difference for maintainability.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Andrew Purtell 2022-07-13 11:23:07 -07:00
parent 84f0d145d7
commit 01b45e285d
2 changed files with 2 additions and 2 deletions

View File

@ -69,11 +69,11 @@ public class TestSecureNettyRpcServer extends TestNettyRpcServer {
@After
public void tearDown() throws Exception {
super.tearDown();
if (KDC != null) {
KDC.stop();
}
KEYTAB_FILE.delete();
super.tearDown();
TEST_UTIL.cleanupTestDir();
}

View File

@ -70,11 +70,11 @@ public class TestSecureSimpleRpcServer extends TestSimpleRpcServer {
@AfterClass
public static void tearDownClass() throws Exception {
TestSimpleRpcServer.tearDownClass();
if (KDC != null) {
KDC.stop();
}
KEYTAB_FILE.delete();
TestSimpleRpcServer.tearDownClass();
TEST_UTIL.cleanupTestDir();
}