Repository: falcon Updated Branches: refs/heads/master e21696bd3 -> c781e3f7e
FALCON-990 Fix and enable 3/4 tests of RescheduleProcessInFinalStatesTest. Contributed by Ruslan Ostafiychuk Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/c781e3f7 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/c781e3f7 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/c781e3f7 Branch: refs/heads/master Commit: c781e3f7e35917501303466523326599f03bb0a6 Parents: e21696b Author: Ruslan Ostafiychuk <[email protected]> Authored: Wed Jan 14 17:17:52 2015 +0200 Committer: Ruslan Ostafiychuk <[email protected]> Committed: Wed Jan 14 17:17:52 2015 +0200 ---------------------------------------------------------------------- falcon-regression/CHANGES.txt | 2 ++ .../apache/falcon/regression/core/util/InstanceUtil.java | 5 ++++- .../prism/RescheduleProcessInFinalStatesTest.java | 11 +++++------ 3 files changed, 11 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/c781e3f7/falcon-regression/CHANGES.txt ---------------------------------------------------------------------- diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt index fb649c8..80a4f94 100644 --- a/falcon-regression/CHANGES.txt +++ b/falcon-regression/CHANGES.txt @@ -202,6 +202,8 @@ Trunk (Unreleased) FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG) BUG FIXES + FALCON-990 Fix and enable 3/4 tests of RescheduleProcessInFinalStatesTest (Ruslan Ostafiychuk) + FALCON-951 Adding wait till instance goes into running for tests in falcon trunk (Pragya Mittal via Raghav Kumar Gautam) http://git-wip-us.apache.org/repos/asf/falcon/blob/c781e3f7/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java ---------------------------------------------------------------------- diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java index 25b6c51..89b137e 100644 --- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java +++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java @@ -974,11 +974,14 @@ public final class InstanceUtil { OozieClient oozieClient = coloHelper.getProcessHelper().getOozieClient(); BundleJob j = oozieClient.getBundleJobInfo(bundleID); + LOGGER.info(sleepCount + ". Current status: " + j.getStatus() + + "; expected: " + expectedStatus); if (j.getStatus() == expectedStatus) { - break; + return; } TimeUtil.sleepSeconds(20); } + Assert.fail("State " + expectedStatus + " wasn't reached in " + totalMinutesToWait + " mins"); } /** http://git-wip-us.apache.org/repos/asf/falcon/blob/c781e3f7/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleProcessInFinalStatesTest.java ---------------------------------------------------------------------- diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleProcessInFinalStatesTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleProcessInFinalStatesTest.java index 541840a..4856aba 100644 --- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleProcessInFinalStatesTest.java +++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/RescheduleProcessInFinalStatesTest.java @@ -49,7 +49,7 @@ import java.util.List; /** * Tests with rescheduling process in final states. */ -@Test(groups = "embedded", enabled = false) +@Test(groups = "embedded", enabled = true) public class RescheduleProcessInFinalStatesTest extends BaseTestClass { private ColoHelper cluster = servers.get(0); @@ -63,7 +63,6 @@ public class RescheduleProcessInFinalStatesTest extends BaseTestClass { public void createTestData() throws Exception { LOGGER.info("in @BeforeClass"); uploadDirToClusters(aggregateWorkflowDir, OSUtil.RESOURCES_OOZIE); - Bundle b = BundleUtil.readELBundle(); b.generateUniqueBundle(); b = new Bundle(b, cluster); @@ -108,7 +107,7 @@ public class RescheduleProcessInFinalStatesTest extends BaseTestClass { * * @throws Exception */ - @Test(enabled = false) + @Test(enabled = true) public void rescheduleSucceeded() throws Exception { InstanceUtil .waitForBundleToReachState(cluster, bundles[0].getProcessName(), Status.SUCCEEDED); @@ -151,11 +150,11 @@ public class RescheduleProcessInFinalStatesTest extends BaseTestClass { * * @throws Exception */ - @Test(enabled = false) + @Test(enabled = true) public void rescheduleDWE() throws Exception { prism.getProcessHelper() .getProcessInstanceKill(Util.readEntityName(bundles[0].getProcessData()), - "?start=2010-01-02T01:05Z"); + "?start=2010-01-02T01:05Z&end=2010-01-02T01:11Z"); InstanceUtil .waitForBundleToReachState(cluster, bundles[0].getProcessName(), Status.DONEWITHERROR); @@ -174,7 +173,7 @@ public class RescheduleProcessInFinalStatesTest extends BaseTestClass { * Make process run into DOWN WITH ERROR state. Delete it. Check that entity is absent on the * server. Reschedule it and check that it succeeds in some time. **/ - @Test(enabled = false) + @Test(enabled = true) public void rescheduleKilled() throws Exception { prism.getProcessHelper().delete(bundles[0].getProcessData()); InstanceUtil
