Repository: oozie
Updated Branches:
  refs/heads/master b12a9f85e -> ee8710bde


OOZIE-2435 TestCoordChangeXCommand is flakey (fdenes via rkanter)


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

Branch: refs/heads/master
Commit: ee8710bdeb05030bcd10f76ed8e7a82c78c95553
Parents: b12a9f8
Author: Robert Kanter <[email protected]>
Authored: Thu Jan 14 10:23:07 2016 -0800
Committer: Robert Kanter <[email protected]>
Committed: Thu Jan 14 10:23:07 2016 -0800

----------------------------------------------------------------------
 .../command/coord/TestCoordChangeXCommand.java  | 26 +++++++++++++++++---
 release-log.txt                                 |  1 +
 2 files changed, 23 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/ee8710bd/core/src/test/java/org/apache/oozie/command/coord/TestCoordChangeXCommand.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/oozie/command/coord/TestCoordChangeXCommand.java
 
b/core/src/test/java/org/apache/oozie/command/coord/TestCoordChangeXCommand.java
index 5635c0a..1834c85 100644
--- 
a/core/src/test/java/org/apache/oozie/command/coord/TestCoordChangeXCommand.java
+++ 
b/core/src/test/java/org/apache/oozie/command/coord/TestCoordChangeXCommand.java
@@ -44,7 +44,9 @@ import 
org.apache.oozie.executor.jpa.SLARegistrationQueryExecutor;
 import org.apache.oozie.executor.jpa.SLARegistrationQueryExecutor.SLARegQuery;
 import org.apache.oozie.executor.jpa.SLASummaryQueryExecutor;
 import org.apache.oozie.executor.jpa.SLASummaryQueryExecutor.SLASummaryQuery;
+import org.apache.oozie.service.CallableQueueService;
 import org.apache.oozie.service.JPAService;
+import org.apache.oozie.service.Service;
 import org.apache.oozie.service.Services;
 import org.apache.oozie.service.StatusTransitService;
 import org.apache.oozie.sla.SLARegistrationBean;
@@ -52,6 +54,7 @@ import org.apache.oozie.sla.SLASummaryBean;
 import org.apache.oozie.store.StoreException;
 import org.apache.oozie.test.XDataTestCase;
 import org.apache.oozie.util.DateUtils;
+import org.apache.oozie.util.XCallable;
 
 public class TestCoordChangeXCommand extends XDataTestCase {
     private Services services;
@@ -67,11 +70,26 @@ public class TestCoordChangeXCommand extends XDataTestCase {
         return DateUtils.formatDateOozieTZ(new Date(timeStamp));
     }
 
+    /**
+     * Class is used to change the queueservice, as that one meddles with the 
actions in the background.
+     */
+    static class FakeCallableQueueService extends CallableQueueService 
implements Service {
+        @Override
+        public void init(Services services){}
+
+        @Override
+        public void destroy(){}
+
+        @Override
+        public synchronized boolean queueSerial(List<? extends XCallable<?>> 
callables, long delay){return false;}
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
         services = new Services();
         services.init();
+        services.setService(FakeCallableQueueService.class);
     }
 
     @Override
@@ -699,10 +717,10 @@ public class TestCoordChangeXCommand extends 
XDataTestCase {
                 job.getId() + "@3");
         ca4 = 
CoordActionQueryExecutor.getInstance().get(CoordActionQueryExecutor.CoordActionQuery.GET_COORD_ACTION,
                 job.getId() + "@4");
-        assertEquals(ca1.getStatusStr(), 
CoordinatorAction.Status.RUNNING.toString());
-        assertEquals(ca2.getStatusStr(), 
CoordinatorAction.Status.RUNNING.toString());
-        assertFalse(ca3.getStatus().equals(CoordinatorAction.Status.READY));
-        assertFalse(ca4.getStatus().equals(CoordinatorAction.Status.READY));
+        assertEquals(CoordinatorAction.Status.RUNNING.toString(), 
ca1.getStatusStr());
+        assertEquals(CoordinatorAction.Status.RUNNING.toString(), 
ca2.getStatusStr());
+        assertEquals(CoordinatorAction.Status.READY.toString(), 
ca3.getStatusStr());
+        assertEquals(CoordinatorAction.Status.READY.toString(), 
ca4.getStatusStr());
     }
     // Checks that RUNNING coord action is not deleted
     public void testChangeTimeDeleteRunning() throws Exception {

http://git-wip-us.apache.org/repos/asf/oozie/blob/ee8710bd/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 21f19a6..1355d65 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.3.0 release (trunk - unreleased)
 
+OOZIE-2435 TestCoordChangeXCommand is flakey (fdenes via rkanter)
 OOZIE-2428 TestSLAService, TestSLAEventGeneration flakey tests (fdenes via 
rkanter)
 OOZIE-2437 Exclude additional Hadoop dependencies from Spark Sharelib (rkanter)
 OOZIE-2030 Configuration properties from global section is not getting set in 
Hadoop job conf when using sub-workflow action in Oozie workflow.xml 
(jaydeepvishwakarma via rohini)

Reply via email to