diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestKDiag.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestKDiag.java index b81c4c5176..e395566dae 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestKDiag.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestKDiag.java @@ -67,7 +67,7 @@ public static void nameThread() { @BeforeClass public static void startMiniKdc() throws Exception { - workDir = new File(System.getProperty("test.dir", "target")); + workDir = GenericTestUtils.getTestDir(TestKDiag.class.getSimpleName()); securityProperties = MiniKdc.createConf(); kdc = new MiniKdc(securityProperties, workDir); kdc.start();