falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rag...@apache.org
Subject git commit: FALCON-867 In process ACL tests process validity needs to be in future. Contributed by Raghav Kumar Gautam
Date Thu, 06 Nov 2014 00:50:45 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master e99c0892c -> 86e0ccfa0


FALCON-867 In process ACL tests process validity needs to be in future. Contributed by Raghav
Kumar Gautam


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

Branch: refs/heads/master
Commit: 86e0ccfa094110ab6a38d1a2f124f597cad48a62
Parents: e99c089
Author: Raghav Kumar Gautam <raghav@apache.org>
Authored: Wed Nov 5 16:50:39 2014 -0800
Committer: Raghav Kumar Gautam <raghav@apache.org>
Committed: Wed Nov 5 16:50:39 2014 -0800

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                               | 3 +++
 .../apache/falcon/regression/security/ProcessAclTest.java   | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/86e0ccfa/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 8ed66ff..cfd15aa 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -137,6 +137,9 @@ Trunk (Unreleased)
    FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG)
 
   BUG FIXES
+   FALCON-867 In process ACL tests process validity needs to be in future
+   (Raghav Kumar Gautam)
+
    FALCON-866 Lineage endpoints need to be changed for merlin
    (Raghav Kumar Gautam)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/86e0ccfa/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
index bc79835..ce04902 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
@@ -33,6 +33,8 @@ import org.apache.falcon.regression.core.util.OSUtil;
 import org.apache.falcon.regression.testHelper.BaseTestClass;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.log4j.Logger;
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterMethod;
@@ -43,6 +45,7 @@ import org.testng.annotations.Test;
 
 import java.io.IOException;
 import java.lang.reflect.Method;
+import java.util.Date;
 
 @Test(groups = "authorization")
 public class ProcessAclTest extends BaseTestClass {
@@ -71,7 +74,11 @@ public class ProcessAclTest extends BaseTestClass {
         bundles[0].setProcessWorkflow(aggregateWorkflowDir);
         bundles[0].setProcessACL(MerlinConstants.CURRENT_USER_NAME,
             MerlinConstants.CURRENT_USER_GROUP, "*");
-        processString = bundles[0].getProcessData();
+        final ProcessMerlin processMerlin = bundles[0].getProcessObject();
+        //setting end date of the process to 10 minutes in future
+        final Date tenMinInFuture = new DateTime(DateTimeZone.UTC).plusMinutes(10).toDate();
+        processMerlin.getClusters().getClusters().get(0).getValidity().setEnd(tenMinInFuture);
+        processString = processMerlin.toString();
 
         KerberosHelper.loginFromKeytab(MerlinConstants.CURRENT_USER_NAME);
     }


Mime
View raw message