falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suh...@apache.org
Subject git commit: FALCON-561 Falcon jenkins failure in EntityManagerJerseyIT. Contributed by Shwetha GS
Date Thu, 31 Jul 2014 11:44:49 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 3bb5a62af -> b2e1032d0


FALCON-561 Falcon jenkins failure in EntityManagerJerseyIT. Contributed by Shwetha GS


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

Branch: refs/heads/master
Commit: b2e1032d0c455cf09139bab336f051e2ae26fb4c
Parents: 3bb5a62
Author: Suhas V <suhas.v@inmobi.com>
Authored: Thu Jul 31 17:14:40 2014 +0530
Committer: Suhas V <suhas.v@inmobi.com>
Committed: Thu Jul 31 17:14:40 2014 +0530

----------------------------------------------------------------------
 CHANGES.txt                                          |  3 +++
 .../falcon/resource/EntityManagerJerseyIT.java       |  1 +
 .../java/org/apache/falcon/util/OozieTestUtils.java  | 15 +++++++++++----
 3 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b2e1032d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1a53de9..d7a9598 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,6 +28,9 @@ Trunk (Unreleased)
   OPTIMIZATIONS
 
   BUG FIXES
+   FALCON-561 Falcon jenkins failure in EntityManagerJerseyIT.
+   (Shwetha GS via Suhas Vasu)
+
    FALCON-556 Feed Replication _SUCCESS is not getting created on target directory.
    (pavan kumar kolamuri via Suhas Vasu)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b2e1032d/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java
index 6be5e25..9d801c8 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java
@@ -318,6 +318,7 @@ public class EntityManagerJerseyIT {
         }
 
         assert newBundle != null;
+        OozieTestUtils.waitForBundleStart(context, newBundle, Job.Status.RUNNING, Status.PREP);
         coord = ozClient.getCoordJobInfo(ozClient.getBundleJobInfo(newBundle).getCoordinators().get(0).getId());
         Assert.assertTrue(coord.getStatus() == Status.RUNNING || coord.getStatus() == Status.PREP);
         Assert.assertEquals(coord.getStartTime(), endTime);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b2e1032d/webapp/src/test/java/org/apache/falcon/util/OozieTestUtils.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/util/OozieTestUtils.java b/webapp/src/test/java/org/apache/falcon/util/OozieTestUtils.java
index e430875..de8bc33 100644
--- a/webapp/src/test/java/org/apache/falcon/util/OozieTestUtils.java
+++ b/webapp/src/test/java/org/apache/falcon/util/OozieTestUtils.java
@@ -29,6 +29,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.oozie.client.BundleJob;
 import org.apache.oozie.client.CoordinatorJob;
 import org.apache.oozie.client.Job;
+import org.apache.oozie.client.Job.Status;
 import org.apache.oozie.client.ProxyOozieClient;
 import org.apache.oozie.client.WorkflowJob;
 
@@ -106,18 +107,24 @@ public final class OozieTestUtils {
     }
 
     public static void waitForBundleStart(TestContext context, Job.Status... status) throws
Exception {
-        ProxyOozieClient ozClient = getOozieClient(context);
         List<BundleJob> bundles = getBundles(context);
         if (bundles.isEmpty()) {
             return;
         }
 
+        waitForBundleStart(context, bundles.get(0).getId(), status);
+    }
+
+    public static void waitForBundleStart(TestContext context, String bundleId, Job.Status...
status) throws Exception {
+        ProxyOozieClient ozClient = getOozieClient(context);
         Set<Job.Status> statuses = new HashSet<Job.Status>(Arrays.asList(status));
-        String bundleId = bundles.get(0).getId();
+
+        Status bundleStatus = null;
         for (int i = 0; i < 15; i++) {
             Thread.sleep(i * 1000);
             BundleJob bundle = ozClient.getBundleJobInfo(bundleId);
-            if (statuses.contains(bundle.getStatus())) {
+            bundleStatus = bundle.getStatus();
+            if (statuses.contains(bundleStatus)) {
                 if (statuses.contains(Job.Status.FAILED) || statuses.contains(Job.Status.KILLED))
{
                     return;
                 }
@@ -134,7 +141,7 @@ public final class OozieTestUtils {
             }
             System.out.println("Waiting for bundle " + bundleId + " in " + statuses + " state");
         }
-        throw new Exception("Bundle " + bundleId + " is not " + statuses + " in oozie");
+        throw new Exception("Bundle " + bundleId + " is not " + statuses + ". Last seen status
" + bundleStatus);
     }
 
     public static WorkflowJob getWorkflowJob(Cluster cluster, String filter) throws Exception
{


Mime
View raw message