You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by vi...@apache.org on 2012/09/21 18:20:13 UTC
svn commit: r1388562 - in
/oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie:
action/hadoop/ executor/jpa/ service/
Author: virag
Date: Fri Sep 21 16:20:13 2012
New Revision: 1388562
URL: http://svn.apache.org/viewvc?rev=1388562&view=rev
Log:
Correctly applying OOZIE-989.patch
Modified:
oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestMapReduceActionExecutor.java
oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java
oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java
oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java
Modified: oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestMapReduceActionExecutor.java
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestMapReduceActionExecutor.java?rev=1388562&r1=1388561&r2=1388562&view=diff
==============================================================================
--- oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestMapReduceActionExecutor.java (original)
+++ oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/action/hadoop/TestMapReduceActionExecutor.java Fri Sep 21 16:20:13 2012
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Modified: oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java?rev=1388562&r1=1388561&r2=1388562&view=diff
==============================================================================
--- oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java (original)
+++ oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsGetForPurgeJPAExecutor.java Fri Sep 21 16:20:13 2012
@@ -47,9 +47,9 @@ public class TestCoordJobsGetForPurgeJPA
@Override
protected void setUp() throws Exception {
super.setUp();
- services = new Services();
- services.init();
+ LocalOozie.start();
cleanUpDBTables();
+
}
/* (non-Javadoc)
@@ -57,7 +57,7 @@ public class TestCoordJobsGetForPurgeJPA
*/
@Override
protected void tearDown() throws Exception {
- services.destroy();
+ LocalOozie.stop();
super.tearDown();
}
Modified: oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java?rev=1388562&r1=1388561&r2=1388562&view=diff
==============================================================================
--- oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java (original)
+++ oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobsToBeMaterializedJPAExecutor.java Fri Sep 21 16:20:13 2012
@@ -47,8 +47,7 @@ public class TestCoordJobsToBeMaterializ
@Override
protected void setUp() throws Exception {
super.setUp();
- services = new Services();
- services.init();
+ LocalOozie.start();
cleanUpDBTables();
}
@@ -57,7 +56,7 @@ public class TestCoordJobsToBeMaterializ
*/
@Override
protected void tearDown() throws Exception {
- services.destroy();
+ LocalOozie.stop();
super.tearDown();
}
Modified: oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java?rev=1388562&r1=1388561&r2=1388562&view=diff
==============================================================================
--- oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java (original)
+++ oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/service/TestRecoveryService.java Fri Sep 21 16:20:13 2012
@@ -186,9 +186,9 @@ public class TestRecoveryService extends
store3.commitTrx();
store3.closeTrx();
}
-
+
/**
- * Tests functionality of the Recovery Service Runnable command. </p> Starts an action with USER_RETRY status.
+ * Tests functionality of the Recovery Service Runnable command. </p> Starts an action with USER_RETRY status.
* Runs the recovery runnable, and ensures the state changes to OK and the job completes successfully.
*
* @throws Exception
@@ -197,16 +197,16 @@ public class TestRecoveryService extends
final JPAService jpaService = Services.get().get(JPAService.class);
WorkflowJobBean job = this.addRecordToWfJobTable(WorkflowJob.Status.RUNNING, WorkflowInstance.Status.RUNNING);
WorkflowActionBean action = this.addRecordToWfActionTable(job.getId(), "1", WorkflowAction.Status.USER_RETRY);
-
+
Runnable recoveryRunnable = new RecoveryRunnable(0, 60, 60);
recoveryRunnable.run();
sleep(3000);
-
+
final WorkflowActionGetJPAExecutor wfActionGetCmd = new WorkflowActionGetJPAExecutor(action.getId());
waitFor(5000, new Predicate() {
public boolean evaluate() throws Exception {
- WorkflowActionBean a = jpaService.execute(wfActionGetCmd);
+ WorkflowActionBean a = jpaService.execute(wfActionGetCmd);
return a.getExternalId() != null;
}
});
@@ -233,7 +233,7 @@ public class TestRecoveryService extends
assertTrue(launcherJob.isSuccessful());
assertTrue(LauncherMapper.hasIdSwap(launcherJob));
}
-
+
/**
* Tests functionality of the Recovery Service Runnable command. </p> Insert a coordinator job with RUNNING and
@@ -699,7 +699,7 @@ public class TestRecoveryService extends
throw se;
}
}
-
+
@Override
protected WorkflowActionBean addRecordToWfActionTable(String wfId, String actionName, WorkflowAction.Status status)
throws Exception {