You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ro...@apache.org on 2015/04/27 17:04:25 UTC

falcon git commit: FALCON-1166 Fixing FeedReplicationTest, TouchAPIPrismAndServerTest, ProcessLibPathLoadTest. Contributed by Pragya Mittal

Repository: falcon
Updated Branches:
  refs/heads/master 9124f0152 -> 044e4b16a


FALCON-1166 Fixing FeedReplicationTest, TouchAPIPrismAndServerTest, ProcessLibPathLoadTest. Contributed by Pragya Mittal


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

Branch: refs/heads/master
Commit: 044e4b16a3f3a37bbf6f107c2a93d32a708753ea
Parents: 9124f01
Author: Ruslan Ostafiychuk <ro...@apache.org>
Authored: Mon Apr 27 18:04:00 2015 +0300
Committer: Ruslan Ostafiychuk <ro...@apache.org>
Committed: Mon Apr 27 18:04:00 2015 +0300

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                           |  3 +++
 .../apache/falcon/regression/FeedReplicationTest.java   |  2 +-
 .../falcon/regression/ProcessLibPathLoadTest.java       |  7 +++++--
 .../falcon/regression/TouchAPIPrismAndServerTest.java   | 12 ++++++------
 4 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/044e4b16/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 884acfc..193beff 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -305,6 +305,9 @@ Trunk (Unreleased)
    FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG)
 
   BUG FIXES
+   FALCON-1166 Fixing FeedReplicationTest, TouchAPIPrismAndServerTest, ProcessLibPathLoadTest
+   (Pragya Mittal via Ruslan Ostafiychuk)
+
    FALCON-1155 Unwanted character at the end of workflow.xml (Karishma Gulati via Ruslan Ostafiychuk)
 
    FALCON-1072 Dumping of Oozie info should use os specific newline (Raghav Kumar Gautam)

http://git-wip-us.apache.org/repos/asf/falcon/blob/044e4b16/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
index 9ba5625..6fd2348 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
@@ -346,7 +346,7 @@ public class FeedReplicationTest extends BaseTestClass {
 
         //create availability flag on source
         HadoopUtil.copyDataToFolder(cluster1FS, sourceLocation,
-                OSUtil.OOZIE_EXAMPLE_INPUT_DATA + availabilityFlagName);
+                OSUtil.RESOURCES + availabilityFlagName);
 
         //check if instance become running
         InstanceUtil.waitTillInstanceReachState(cluster2OC, feed.getName(), 1,

http://git-wip-us.apache.org/repos/asf/falcon/blob/044e4b16/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessLibPathLoadTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessLibPathLoadTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessLibPathLoadTest.java
index 3988ae9..d4da519 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessLibPathLoadTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessLibPathLoadTest.java
@@ -18,6 +18,7 @@
 
 package org.apache.falcon.regression;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.regression.core.bundle.Bundle;
 import org.apache.falcon.entity.v0.Frequency.TimeUnit;
@@ -60,6 +61,7 @@ public class ProcessLibPathLoadTest extends BaseTestClass {
     @BeforeClass(alwaysRun = true)
     public void createTestData() throws Exception {
         LOGGER.info("in @BeforeClass");
+        FileUtils.forceMkdir(new File(OSUtil.OOZIE_LIB_FOLDER + "lib"));
         saveUrlToFile(oozieLib);
     }
 
@@ -86,9 +88,10 @@ public class ProcessLibPathLoadTest extends BaseTestClass {
     }
 
     @AfterClass(alwaysRun = true)
-    public void deleteJar() {
+    public void deleteJar() throws IOException {
         File file = new File(filename);
         Assert.assertEquals(file.delete(), true, filename + " is not present.");
+        FileUtils.deleteDirectory(new File(OSUtil.OOZIE_LIB_FOLDER + "lib"));
     }
 
     /**
@@ -144,7 +147,7 @@ public class ProcessLibPathLoadTest extends BaseTestClass {
 
         InputStream input = http.getInputStream();
         byte[] buffer = new byte[4096];
-        int n = -1;
+        int n;
         OutputStream output = new FileOutputStream(new File(filename));
         while ((n = input.read(buffer)) != -1) {
             output.write(buffer, 0, n);

http://git-wip-us.apache.org/repos/asf/falcon/blob/044e4b16/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/TouchAPIPrismAndServerTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/TouchAPIPrismAndServerTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/TouchAPIPrismAndServerTest.java
index f67cbf8..d27ff65 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/TouchAPIPrismAndServerTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/TouchAPIPrismAndServerTest.java
@@ -95,7 +95,7 @@ public class TouchAPIPrismAndServerTest extends BaseTestClass {
         ServiceResponse response = prism.getProcessHelper().touchEntity(bundles[0].getProcessData());
         String bundleId = OozieUtil.getLatestBundleID(clusterOC, bundles[0].getProcessName(), EntityType.PROCESS);
         Assert.assertNotEquals(oldbundleId, bundleId, "Bundle ids are same. No new bundle generated.");
-        validate(response, "Old bundle id: " + coordId + ". New bundle id: " + bundleId);
+        validate(response, "Old coordinator id: " + coordId + ". New bundle id: " + bundleId);
 
         // via server
         oldbundleId = bundleId;
@@ -103,7 +103,7 @@ public class TouchAPIPrismAndServerTest extends BaseTestClass {
         response = cluster.getProcessHelper().touchEntity(bundles[0].getProcessData());
         bundleId = OozieUtil.getLatestBundleID(clusterOC, bundles[0].getProcessName(), EntityType.PROCESS);
         Assert.assertNotEquals(oldbundleId, bundleId, "Bundle ids are same. No new bundle generated.");
-        validate(response, "Old bundle id: " + coordId + ". New bundle id: " + bundleId);
+        validate(response, "Old coordinator id: " + coordId + ". New bundle id: " + bundleId);
     }
 
     /**
@@ -125,7 +125,7 @@ public class TouchAPIPrismAndServerTest extends BaseTestClass {
         ServiceResponse response = prism.getFeedHelper().touchEntity(bundles[0].getDataSets().get(0));
         String bundleId = OozieUtil.getLatestBundleID(clusterOC, clusterName, EntityType.FEED);
         Assert.assertNotEquals(oldbundleId, bundleId, "Bundle ids are same. No new bundle generated.");
-        validate(response, "Old bundle id: " + coordId + ". New bundle id: " + bundleId);
+        validate(response, "Old coordinator id: " + coordId + ". New bundle id: " + bundleId);
 
         // via server
         oldbundleId = bundleId;
@@ -134,7 +134,7 @@ public class TouchAPIPrismAndServerTest extends BaseTestClass {
         response = cluster.getFeedHelper().touchEntity(bundles[0].getDataSets().get(0));
         bundleId = OozieUtil.getLatestBundleID(clusterOC, clusterName, EntityType.FEED);
         Assert.assertNotEquals(oldbundleId, bundleId, "Bundle ids are same. No new bundle generated.");
-        validate(response, "Old bundle id: " + coordId + ". New bundle id: " + bundleId);
+        validate(response, "Old coordinator id: " + coordId + ". New bundle id: " + bundleId);
 
     }
 
@@ -160,14 +160,14 @@ public class TouchAPIPrismAndServerTest extends BaseTestClass {
         ServiceResponse response = prism.getProcessHelper().touchEntity(bundles[0].getProcessData());
         String bundleId = OozieUtil.getLatestBundleID(clusterOC, bundles[0].getProcessName(), EntityType.PROCESS);
         Assert.assertEquals(oldbundleId, bundleId, "New bundle generated");
-        validate(response, "Old bundle id: " + coordId);
+        validate(response, "Old coordinator id: " + coordId);
 
         //via server
         oldbundleId = bundleId;
         response = cluster.getProcessHelper().touchEntity(bundles[0].getProcessData());
         bundleId = OozieUtil.getLatestBundleID(clusterOC, bundles[0].getProcessName(), EntityType.PROCESS);
         Assert.assertEquals(oldbundleId, bundleId, "New bundle generated");
-        validate(response, "Old bundle id: " + coordId);
+        validate(response, "Old coordinator id: " + coordId);
     }
 
     private void validate(ServiceResponse response, String message) throws JAXBException {