Repository: falcon
Updated Branches:
  refs/heads/master 44fcfc5b0 -> 10ee01a85


FALCON-1784 Add regression test for for FALCON-1647. 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/10ee01a8
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/10ee01a8
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/10ee01a8

Branch: refs/heads/master
Commit: 10ee01a85c4e7bdfaec57e298550551e067cca91
Parents: 44fcfc5
Author: Paul Isaychuk <[email protected]>
Authored: Wed Jan 27 17:42:32 2016 +0200
Committer: Paul Isaychuk <[email protected]>
Committed: Tue Feb 16 12:22:22 2016 +0200

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                   |  2 ++
 .../regression/FeedSubmitAndScheduleTest.java   | 23 +++++++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/10ee01a8/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index d22d662..77772a0 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -5,6 +5,8 @@ Trunk (Unreleased)
   INCOMPATIBLE CHANGES
 
   NEW FEATURES
+   FALCON-1784 Add regression test for for FALCON-1647 (Paul Isaychuk)
+
    FALCON-1829 Add regression for submit and schedule process on native 
scheduler (time based) (Pragya Mittal)
 
    FALCON-1766 Add CLI metrics check for HiveDR, HDFS and feed replication 
(Paul Isaychuk)

http://git-wip-us.apache.org/repos/asf/falcon/blob/10ee01a8/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
----------------------------------------------------------------------
diff --git 
a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
 
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
index 46015dc..f7bf0f8 100644
--- 
a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
+++ 
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
@@ -19,7 +19,9 @@
 package org.apache.falcon.regression;
 
 import org.apache.falcon.entity.v0.EntityType;
+import org.apache.falcon.regression.Entities.FeedMerlin;
 import org.apache.falcon.regression.core.bundle.Bundle;
+import org.apache.falcon.regression.core.enumsAndConstants.MerlinConstants;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.AssertUtil;
@@ -58,7 +60,8 @@ public class FeedSubmitAndScheduleTest extends BaseTestClass {
 
     @AfterMethod(alwaysRun = true)
     public void tearDown() {
-        removeTestClassEntities();
+        //remove entities which belong to both default and different user
+        removeTestClassEntities(null, MerlinConstants.DIFFERENT_USER_NAME);
     }
 
     @Test(groups = {"singleCluster"})
@@ -151,4 +154,22 @@ public class FeedSubmitAndScheduleTest extends 
BaseTestClass {
         AssertUtil.assertSucceeded(response);
         AssertUtil.checkStatus(clusterOC, EntityType.FEED, bundles[0], 
Job.Status.SUSPENDED);
     }
+
+    /**
+     * Test for https://issues.apache.org/jira/browse/FALCON-1647.
+     * Create cluster entity as user1. Submit and schedule feed entity feed1 
in this cluster as user1.
+     * Now try to submit and schedule a feed entity feed2 in this cluster as 
user2.
+     */
+    @Test
+    public void snsDiffFeedDiffUserSameCluster()
+        throws URISyntaxException, AuthenticationException, 
InterruptedException, IOException, JAXBException {
+        bundles[0].submitClusters(prism);
+        
AssertUtil.assertSucceeded(prism.getFeedHelper().submitAndSchedule(feed));
+        FeedMerlin feedMerlin = FeedMerlin.fromString(feed);
+        feedMerlin.setName(feedMerlin.getName() + "-2");
+        feedMerlin.setACL(MerlinConstants.DIFFERENT_USER_NAME, 
MerlinConstants.DIFFERENT_USER_GROUP, "*");
+        ServiceResponse response = prism.getFeedHelper().submitAndSchedule(
+            feedMerlin.toString(), MerlinConstants.DIFFERENT_USER_NAME, null);
+        AssertUtil.assertSucceeded(response);
+    }
 }

Reply via email to