Commit 243a4321 by Sarath Subramanian

ATLAS-2957: Fix and enable disabled StormHook Integrations Tests

parent e7b9131d
...@@ -36,7 +36,7 @@ import org.testng.annotations.AfterClass; ...@@ -36,7 +36,7 @@ import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@Test(enabled = false) @Test
public class StormAtlasHookIT { public class StormAtlasHookIT {
public static final Logger LOG = LoggerFactory.getLogger(StormAtlasHookIT.class); public static final Logger LOG = LoggerFactory.getLogger(StormAtlasHookIT.class);
...@@ -70,8 +70,7 @@ public class StormAtlasHookIT { ...@@ -70,8 +70,7 @@ public class StormAtlasHookIT {
atlasClient = null; atlasClient = null;
} }
//TODO: Fix failing test @Test
@Test(enabled = false)
public void testAddEntities() throws Exception { public void testAddEntities() throws Exception {
StormTopology stormTopology = StormTestUtil.createTestTopology(); StormTopology stormTopology = StormTestUtil.createTestTopology();
StormTestUtil.submitTopology(stormCluster, TOPOLOGY_NAME, stormTopology); StormTestUtil.submitTopology(stormCluster, TOPOLOGY_NAME, stormTopology);
......
...@@ -74,16 +74,18 @@ public class FailedMessagesLogger { ...@@ -74,16 +74,18 @@ public class FailedMessagesLogger {
*/ */
private String getRootLoggerDirectory() { private String getRootLoggerDirectory() {
String rootLoggerDirectory = null; String rootLoggerDirectory = null;
org.apache.log4j.Logger rootLogger = org.apache.log4j.Logger.getRootLogger(); Logger rootLogger = Logger.getRootLogger();
Enumeration allAppenders = rootLogger.getAllAppenders(); Enumeration allAppenders = rootLogger.getAllAppenders();
if (allAppenders != null) { if (allAppenders != null) {
while (allAppenders.hasMoreElements()) { while (allAppenders.hasMoreElements()) {
Appender appender = (Appender) allAppenders.nextElement(); Appender appender = (Appender) allAppenders.nextElement();
if (appender instanceof FileAppender) { if (appender instanceof FileAppender) {
FileAppender fileAppender = (FileAppender) appender; FileAppender fileAppender = (FileAppender) appender;
String rootLoggerFile = fileAppender.getFile(); String rootLoggerFile = fileAppender.getFile();
rootLoggerDirectory = new File(rootLoggerFile).getParent();
rootLoggerDirectory = rootLoggerFile != null ? new File(rootLoggerFile).getParent() : null;
break; break;
} }
} }
......
...@@ -1902,6 +1902,8 @@ ...@@ -1902,6 +1902,8 @@
<systemProperties> <systemProperties>
<user.dir>${project.basedir}</user.dir> <user.dir>${project.basedir}</user.dir>
<atlas.data>${project.build.directory}/data</atlas.data> <atlas.data>${project.build.directory}/data</atlas.data>
<atlas.log.dir>${project.build.directory}/logs</atlas.log.dir>
<atlas.log.file>application.log</atlas.log.file>
<log4j.configuration>atlas-log4j.xml</log4j.configuration> <log4j.configuration>atlas-log4j.xml</log4j.configuration>
<embedded.solr.directory>${project.basedir}/target</embedded.solr.directory> <embedded.solr.directory>${project.basedir}/target</embedded.solr.directory>
</systemProperties> </systemProperties>
...@@ -1932,6 +1934,8 @@ ...@@ -1932,6 +1934,8 @@
<systemPropertyVariables> <systemPropertyVariables>
<projectBaseDir>${projectBaseDir}</projectBaseDir> <projectBaseDir>${projectBaseDir}</projectBaseDir>
<atlas.data>${project.build.directory}/data</atlas.data> <atlas.data>${project.build.directory}/data</atlas.data>
<atlas.log.dir>${project.build.directory}/logs</atlas.log.dir>
<atlas.log.file>application.log</atlas.log.file>
<log4j.configuration>atlas-log4j.xml</log4j.configuration> <log4j.configuration>atlas-log4j.xml</log4j.configuration>
<embedded.solr.directory>${project.basedir}/target</embedded.solr.directory> <embedded.solr.directory>${project.basedir}/target</embedded.solr.directory>
</systemPropertyVariables> </systemPropertyVariables>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment