falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajayyad...@apache.org
Subject [1/3] falcon git commit: FALCON-1382 Add a test for feed retention to make sure that data directory is not deleted. Contributed by Paul Isaychuk.
Date Tue, 25 Aug 2015 11:51:20 GMT
Repository: falcon
Updated Branches:
  refs/heads/0.7 44ca0bdbc -> fbb4d3142


FALCON-1382 Add a test for feed retention to make sure that data directory is not deleted.
Contributed by Paul Isaychuk.


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

Branch: refs/heads/0.7
Commit: ba83ad21fd361cd8f40c68184587307b4c8d9150
Parents: 44ca0bd
Author: Paul Isaychuk <pisaychuk@apache.org>
Authored: Fri Aug 21 12:34:33 2015 +0300
Committer: Ajay Yadava <ajaynsit@gmail.com>
Committed: Tue Aug 25 17:20:30 2015 +0530

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                                 | 2 ++
 .../org/apache/falcon/regression/prism/RetentionTest.java     | 7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/ba83ad21/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 7ad0f3d..af5e660 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -5,6 +5,8 @@ Trunk (Unreleased)
   INCOMPATIBLE CHANGES
 
   NEW FEATURES
+   FALCON-1382 Add a test for feed retention to make sure that data directory is not deleted
(Paul Isaychuk)
+
    FALCON-1321 Add Entity Lineage Test (Pragya Mittal via Ajay Yadava)
 
    FALCON-1319 Contribute HiveDr, Mirror tests and some test fixes (Namit Maheshwari, Paul
Isaychuk,

http://git-wip-us.apache.org/repos/asf/falcon/blob/ba83ad21/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
index 628dca1..8f45d1c 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RetentionTest.java
@@ -37,6 +37,7 @@ import org.apache.falcon.regression.core.util.TimeUtil;
 import org.apache.falcon.regression.core.util.Util;
 import org.apache.falcon.regression.testHelper.BaseTestClass;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.security.authentication.client.AuthenticationException;
 import org.apache.log4j.Logger;
 import org.apache.oozie.client.OozieClient;
@@ -141,7 +142,7 @@ public class RetentionTest extends BaseTestClass {
         }
         final DateTime today = new DateTime(DateTimeZone.UTC);
         final List<DateTime> times = TimeUtil.getDatesOnEitherSide(
-            freqType.addTime(today, -36), freqType.addTime(today, 36), skip, freqType);
+            freqType.addTime(today, -36), freqType.addTime(today, -1), skip, freqType);
         final List<String> dataDates = TimeUtil.convertDatesToString(times, freqType.getFormatter());
         LOGGER.info("dataDates = " + dataDates);
         dataDates.add(HadoopUtil.SOMETHING_RANDOM);
@@ -206,6 +207,9 @@ public class RetentionTest extends BaseTestClass {
 
         Assert.assertTrue(Arrays.deepEquals(finalData.toArray(new String[finalData.size()]),
             expectedOutput.toArray(new String[expectedOutput.size()])));
+
+        //check that root directory exists
+        Assert.assertTrue(clusterFS.exists(new Path(testHDFSDir)), "Base data directory should
be present.");
     }
 
     /**
@@ -273,7 +277,6 @@ public class RetentionTest extends BaseTestClass {
         return finalData;
     }
 
-
     /**
      * Provides different sets of parameters for retention workflow.
      */


Mime
View raw message