AMBARI-15032. KerberosDescriptorTest failed due to moved/missing test directory 
(rlevas)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aa06ebe4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aa06ebe4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aa06ebe4

Branch: refs/heads/branch-dev-patch-upgrade
Commit: aa06ebe4cced24c3f2830e95053bf8a1507bbbb9
Parents: 7e75e52
Author: Robert Levas <rle...@hortonworks.com>
Authored: Tue Feb 16 12:13:54 2016 -0500
Committer: Robert Levas <rle...@hortonworks.com>
Committed: Tue Feb 16 12:13:54 2016 -0500

----------------------------------------------------------------------
 .../apache/ambari/server/stack/KerberosDescriptorTest.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/aa06ebe4/ambari-server/src/test/java/org/apache/ambari/server/stack/KerberosDescriptorTest.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/KerberosDescriptorTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/KerberosDescriptorTest.java
index c7f802f..b8f9670 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/stack/KerberosDescriptorTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/stack/KerberosDescriptorTest.java
@@ -48,7 +48,11 @@ public class KerberosDescriptorTest {
     URL rootDirectoryURL = KerberosDescriptorTest.class.getResource("/");
     Assert.notNull(rootDirectoryURL);
 
-    stacksDirectory = new File(new 
File(rootDirectoryURL.getFile()).getParent(), "classes/stacks");
+    File resourcesDirectory = new File(new 
File(rootDirectoryURL.getFile()).getParentFile().getParentFile(), 
"src/main/resources");
+    Assert.notNull(resourcesDirectory);
+    Assert.isTrue(resourcesDirectory.canRead());
+
+    stacksDirectory = new File(resourcesDirectory, "stacks");
     Assert.notNull(stacksDirectory);
     Assert.isTrue(stacksDirectory.canRead());
 
@@ -64,7 +68,7 @@ public class KerberosDescriptorTest {
     Assert.notNull(hdp22ServicesDirectory);
     Assert.isTrue(hdp22ServicesDirectory.canRead());
 
-    commonServicesDirectory = new File(new 
File(rootDirectoryURL.getFile()).getParent(), "classes/common-services");
+    commonServicesDirectory = new File(resourcesDirectory, "common-services");
     Assert.notNull(commonServicesDirectory);
     Assert.isTrue(commonServicesDirectory.canRead());
 

Reply via email to