Return-Path: X-Original-To: apmail-falcon-commits-archive@minotaur.apache.org Delivered-To: apmail-falcon-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4EAA2102B2 for ; Thu, 4 Dec 2014 22:32:48 +0000 (UTC) Received: (qmail 26545 invoked by uid 500); 4 Dec 2014 22:32:48 -0000 Delivered-To: apmail-falcon-commits-archive@falcon.apache.org Received: (qmail 26508 invoked by uid 500); 4 Dec 2014 22:32:48 -0000 Mailing-List: contact commits-help@falcon.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.incubator.apache.org Delivered-To: mailing list commits@falcon.incubator.apache.org Received: (qmail 26499 invoked by uid 99); 4 Dec 2014 22:32:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2014 22:32:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 04 Dec 2014 22:32:46 +0000 Received: (qmail 26430 invoked by uid 99); 4 Dec 2014 22:32:26 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2014 22:32:26 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id ECC06A1D1A3; Thu, 4 Dec 2014 22:32:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: raghav@apache.org To: commits@falcon.incubator.apache.org Message-Id: <2728b2bb2597435486581fc2b65652b6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-falcon git commit: FALCON-895 Fix intermittent failures in ProcessInstanceStatus and KillsTest classes. Contributed by Paul Isaychuk Date: Thu, 4 Dec 2014 22:32:25 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-falcon Updated Branches: refs/heads/master dcc282389 -> 56900a2b8 FALCON-895 Fix intermittent failures in ProcessInstanceStatus and KillsTest classes. Contributed by Paul Isaychuk Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/56900a2b Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/56900a2b Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/56900a2b Branch: refs/heads/master Commit: 56900a2b860c257242e70bad7edbcd111528bfb3 Parents: dcc2823 Author: Raghav Kumar Gautam Authored: Thu Dec 4 14:32:22 2014 -0800 Committer: Raghav Kumar Gautam Committed: Thu Dec 4 14:32:22 2014 -0800 ---------------------------------------------------------------------- falcon-regression/CHANGES.txt | 3 ++ .../regression/ProcessInstanceKillsTest.java | 37 ++++++++++++++------ .../regression/ProcessInstanceStatusTest.java | 1 + 3 files changed, 31 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/56900a2b/falcon-regression/CHANGES.txt ---------------------------------------------------------------------- diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt index 6a1df5c..a0a1a7d 100644 --- a/falcon-regression/CHANGES.txt +++ b/falcon-regression/CHANGES.txt @@ -169,6 +169,9 @@ Trunk (Unreleased) FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG) BUG FIXES + FALCON-895 Fix intermittent failures in ProcessInstanceStatus and KillsTest classes. + (Paul Isaychuk via Raghav Kumar Gautam) + FALCON-891 Removing some more invalid acl tests (Raghav Kumar Gautam) FALCON-888 Disabling test for special chars in pipeline name and http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/56900a2b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceKillsTest.java ---------------------------------------------------------------------- diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceKillsTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceKillsTest.java index 53054c61..e1a4dd4 100644 --- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceKillsTest.java +++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceKillsTest.java @@ -35,6 +35,7 @@ import org.apache.falcon.resource.InstancesResult.WorkflowStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.log4j.Logger; import org.apache.oozie.client.CoordinatorAction; +import org.apache.oozie.client.CoordinatorJob; import org.apache.oozie.client.OozieClient; import org.testng.Assert; import org.testng.annotations.AfterClass; @@ -45,6 +46,8 @@ import org.testng.annotations.Test; import java.io.IOException; import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.List; /** * Process instance kill tests. @@ -136,26 +139,40 @@ public class ProcessInstanceKillsTest extends BaseTestClass { } /** - * Schedule process. Perform -kill action on instances between -start and -end dates which - * expose range of last 3 instances which have been materialized already and those which - * should be. Check that only existent instances are killed. + * Schedule process. Provide data for all instances except the last, + * thus making it non-materialized (waiting). Try to -kill last 3 instances. + * Check that only running instances were affected. * * @throws Exception */ @Test(groups = {"singleCluster"}) - public void testProcessInstanceKillKillNonMaterialized() throws Exception { - bundles[0].setProcessValidity("2010-01-02T00:00Z", "2010-01-02T01:00Z"); + public void testProcessInstanceKillKillNotRunning() throws Exception { + bundles[0].setProcessValidity("2010-01-02T00:00Z", "2010-01-02T00:26Z"); bundles[0].setProcessTimeOut(3, TimeUnit.minutes); - bundles[0].setProcessPeriodicity(1, TimeUnit.minutes); + bundles[0].setProcessPeriodicity(5, TimeUnit.minutes); + bundles[0].setInputFeedPeriodicity(5, TimeUnit.minutes); bundles[0].setProcessConcurrency(6); bundles[0].submitFeedsScheduleProcess(prism); InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0); - OozieUtil.createMissingDependencies(cluster, EntityType.PROCESS, processName, 0); + + //create data for first 5 instances, 6th should be non-materialized + String bundleId = InstanceUtil.getSequenceBundleID(cluster, processName, EntityType.PROCESS, 0); + for(CoordinatorJob c : clusterOC.getBundleJobInfo(bundleId).getCoordinators()) { + List actions = clusterOC.getCoordJobInfo(c.getId()).getActions(); + if (actions.size() == 6) { + for(int i = 0; i < 5; i++) { + CoordinatorAction action = actions.get(i); + InstanceUtil.createHDFSFolders(cluster, Arrays + .asList(action.getMissingDependencies().split("#"))); + } + break; + } + } InstanceUtil.waitTillInstanceReachState(clusterOC, processName, 5, - CoordinatorAction.Status.RUNNING, EntityType.PROCESS, 5); + CoordinatorAction.Status.RUNNING, EntityType.PROCESS, 3); InstancesResult r = prism.getProcessHelper() - .getProcessInstanceKill(processName, "?start=2010-01-02T00:03Z&end=2010-01-02T00:30Z"); - InstanceUtil.validateResponse(r, 3, 0, 0, 0, 3); + .getProcessInstanceKill(processName, "?start=2010-01-02T00:14Z&end=2010-01-02T00:26Z"); + InstanceUtil.validateResponse(r, 3, 0, 0, 1, 2); LOGGER.info(r.toString()); } http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/56900a2b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceStatusTest.java ---------------------------------------------------------------------- diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceStatusTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceStatusTest.java index 6f88103..91fbf29 100644 --- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceStatusTest.java +++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceStatusTest.java @@ -121,6 +121,7 @@ public class ProcessInstanceStatusTest extends BaseTestClass { bundles[0].setProcessConcurrency(1); bundles[0].submitFeedsScheduleProcess(prism); OozieUtil.createMissingDependencies(cluster, EntityType.PROCESS, processName, 0); + InstanceUtil.waitTillInstanceReachState(clusterOC, processName, 1, Status.RUNNING, EntityType.PROCESS); InstancesResult r = prism.getProcessHelper().getProcessInstanceStatus(processName, "?start=2010-01-02T01:00Z&end=2010-01-02T10:20Z"); InstanceUtil.validateSuccess(r, bundles[0], WorkflowStatus.RUNNING);