Repository: incubator-apex-core Updated Branches: refs/heads/master 39e9beeeb -> c77ea114e
APEXCORE-427 use system property instead of environment variable. Apparently environment variable don't propagate to the unit test jvm Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/dac56acd Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/dac56acd Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/dac56acd Branch: refs/heads/master Commit: dac56acd25f85d61c8cdea2092292ae4aa6bdb1a Parents: a703921 Author: David Yan <[email protected]> Authored: Wed May 4 15:44:33 2016 -0700 Committer: David Yan <[email protected]> Committed: Wed May 4 19:19:02 2016 -0700 ---------------------------------------------------------------------- .travis.yml | 5 +---- .../com/datatorrent/stram/StreamingContainerManagerTest.java | 5 +++++ .../com/datatorrent/stram/plan/logical/DelayOperatorTest.java | 6 ++++++ .../java/com/datatorrent/stram/support/StramTestSupport.java | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/dac56acd/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index f414c25..b18dfda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,10 +15,7 @@ language: java -script: mvn apache-rat:check verify -Dlicense.skip=false - -env: - - TRAVIS=1 +script: mvn apache-rat:check verify -Dlicense.skip=false -Dtravis=true notifications: slack: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/dac56acd/engine/src/test/java/com/datatorrent/stram/StreamingContainerManagerTest.java ---------------------------------------------------------------------- diff --git a/engine/src/test/java/com/datatorrent/stram/StreamingContainerManagerTest.java b/engine/src/test/java/com/datatorrent/stram/StreamingContainerManagerTest.java index 3bf9b11..385e1ae 100644 --- a/engine/src/test/java/com/datatorrent/stram/StreamingContainerManagerTest.java +++ b/engine/src/test/java/com/datatorrent/stram/StreamingContainerManagerTest.java @@ -36,6 +36,8 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.commons.lang.StringUtils; import org.apache.hadoop.io.DataInputByteBuffer; @@ -926,6 +928,7 @@ public class StreamingContainerManagerTest // disable this test in travis because of an intermittent problem similar to this: // http://stackoverflow.com/questions/32172925/travis-ci-sporadic-timeouts-to-localhost // We should remove this when we find a solution to this. + LOG.info("Test testAppDataPush is disabled in Travis"); return; } final String topic = "xyz"; @@ -1114,4 +1117,6 @@ public class StreamingContainerManagerTest criticalPathInfo.latency > latency); lc.shutdown(); } + + private static final Logger LOG = LoggerFactory.getLogger(StreamingContainerManagerTest.class); } http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/dac56acd/engine/src/test/java/com/datatorrent/stram/plan/logical/DelayOperatorTest.java ---------------------------------------------------------------------- diff --git a/engine/src/test/java/com/datatorrent/stram/plan/logical/DelayOperatorTest.java b/engine/src/test/java/com/datatorrent/stram/plan/logical/DelayOperatorTest.java index edd6dd9..6b31d56 100644 --- a/engine/src/test/java/com/datatorrent/stram/plan/logical/DelayOperatorTest.java +++ b/engine/src/test/java/com/datatorrent/stram/plan/logical/DelayOperatorTest.java @@ -37,6 +37,8 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.yarn.util.Clock; import org.apache.hadoop.yarn.util.SystemClock; @@ -329,6 +331,7 @@ public class DelayOperatorTest if (StramTestSupport.isInTravis()) { // disable this test in travis because the failure is apparently intermittently not invoked only on travis // We should remove this when we find a solution to this. + LOG.info("Test testFibonacciRecovery1 is disabled in Travis"); return; } LogicalPlan dag = StramTestSupport.createDAG(testMeta); @@ -368,6 +371,7 @@ public class DelayOperatorTest if (StramTestSupport.isInTravis()) { // disable this test in travis because the failure is apparently intermittently not invoked only on travis // We should remove this when we find a solution to this. + LOG.info("Test testFibonacciRecovery2 is disabled in Travis"); return; } LogicalPlan dag = StramTestSupport.createDAG(testMeta); @@ -482,4 +486,6 @@ public class DelayOperatorTest dag.validate(); } + private static final Logger LOG = LoggerFactory.getLogger(DelayOperatorTest.class); + } http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/dac56acd/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java ---------------------------------------------------------------------- diff --git a/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java b/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java index 43741c0..7b4bf76 100644 --- a/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java +++ b/engine/src/test/java/com/datatorrent/stram/support/StramTestSupport.java @@ -389,7 +389,7 @@ public abstract class StramTestSupport public static boolean isInTravis() { - return "1".equals(System.getenv("TRAVIS")); + return "true".equals(System.getProperty("travis")); } public static class MemoryStorageAgent implements StorageAgent, Serializable
