You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ro...@apache.org on 2015/06/05 19:18:21 UTC
falcon git commit: FALCON-1258 Fix feed validity and fortify
ELExpFutureAndLatestTest. Contributed by Ruslan Ostafiychuk
Repository: falcon
Updated Branches:
refs/heads/master 84eafdb0f -> 0ed1af8c3
FALCON-1258 Fix feed validity and fortify ELExpFutureAndLatestTest. 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/0ed1af8c
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/0ed1af8c
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/0ed1af8c
Branch: refs/heads/master
Commit: 0ed1af8c34b010abcba1ad9ffded3a6ee0cc6361
Parents: 84eafdb
Author: Ruslan Ostafiychuk <ro...@apache.org>
Authored: Fri Jun 5 18:49:27 2015 +0300
Committer: Ruslan Ostafiychuk <ro...@apache.org>
Committed: Fri Jun 5 20:15:39 2015 +0300
----------------------------------------------------------------------
falcon-regression/CHANGES.txt | 2 ++
.../apache/falcon/regression/core/bundle/Bundle.java | 8 ++++----
.../falcon/regression/ELExpFutureAndLatestTest.java | 13 ++++++-------
.../apache/falcon/regression/ELValidationsTest.java | 2 +-
4 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/falcon/blob/0ed1af8c/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 42922a9..3a4bc8d 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -339,6 +339,8 @@ Trunk (Unreleased)
FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG)
BUG FIXES
+ FALCON-1258 Fix feed validity and fortify ELExpFutureAndLatestTest (Ruslan Ostafiychuk)
+
FALCON-1257 Fix feedAclUpdate and processAclUpdate (Ruslan Ostafiychuk)
FALCON-1255 Fix list of expected statuses in drop down on Entity Page (Ruslan Ostafiychuk)
http://git-wip-us.apache.org/repos/asf/falcon/blob/0ed1af8c/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java
index a4635b4..a073101 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java
@@ -267,25 +267,25 @@ public class Bundle {
* Submit all the entities and schedule the process.
*
* @param helper helper of prism host
- * @return message from schedule response
+ * @return schedule response or cluster submit response if it fails
* @throws IOException
* @throws JAXBException
* @throws URISyntaxException
* @throws AuthenticationException
*/
- public String submitFeedsScheduleProcess(ColoHelper helper)
+ public ServiceResponse submitFeedsScheduleProcess(ColoHelper helper)
throws IOException, JAXBException, URISyntaxException,
AuthenticationException, InterruptedException {
ServiceResponse submitResponse = submitBundle(helper);
if (submitResponse.getCode() == 400) {
- return submitResponse.getMessage();
+ return submitResponse;
}
//lets schedule the damn thing now :)
ServiceResponse scheduleResult = helper.getProcessHelper().schedule(getProcessData());
AssertUtil.assertSucceeded(scheduleResult);
TimeUtil.sleepSeconds(7);
- return scheduleResult.getMessage();
+ return scheduleResult;
}
/**
http://git-wip-us.apache.org/repos/asf/falcon/blob/0ed1af8c/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELExpFutureAndLatestTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELExpFutureAndLatestTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELExpFutureAndLatestTest.java
index 6939973..90826f1 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELExpFutureAndLatestTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELExpFutureAndLatestTest.java
@@ -22,6 +22,7 @@ import org.apache.falcon.regression.core.bundle.Bundle;
import org.apache.falcon.entity.v0.EntityType;
import org.apache.falcon.entity.v0.Frequency.TimeUnit;
import org.apache.falcon.regression.core.helpers.ColoHelper;
+import org.apache.falcon.regression.core.util.AssertUtil;
import org.apache.falcon.regression.core.util.BundleUtil;
import org.apache.falcon.regression.core.util.HadoopUtil;
import org.apache.falcon.regression.core.util.InstanceUtil;
@@ -78,12 +79,10 @@ public class ELExpFutureAndLatestTest extends BaseTestClass {
bundles[0] = BundleUtil.readELBundle();
bundles[0] = new Bundle(bundles[0], cluster);
bundles[0].generateUniqueBundle(this);
- bundles[0].setInputFeedDataPath(baseTestDir + "/testData"
- + MINUTE_DATE_PATTERN);
- bundles[0].setOutputFeedLocationData(baseTestDir + "/output"
- + MINUTE_DATE_PATTERN);
+ bundles[0].setInputFeedDataPath(baseTestDir + "/testData" + MINUTE_DATE_PATTERN);
+ bundles[0].setOutputFeedLocationData(baseTestDir + "/output" + MINUTE_DATE_PATTERN);
bundles[0].setInputFeedPeriodicity(5, TimeUnit.minutes);
- bundles[0].setInputFeedValidity("2010-04-01T00:00Z", "2015-04-01T00:00Z");
+ bundles[0].setInputFeedValidity("2010-04-01T00:00Z", "2099-04-01T00:00Z");
String processStart = TimeUtil.getTimeWrtSystemTime(-3);
String processEnd = TimeUtil.getTimeWrtSystemTime(8);
LOGGER.info("processStart: " + processStart + " processEnd: " + processEnd);
@@ -100,7 +99,7 @@ public class ELExpFutureAndLatestTest extends BaseTestClass {
@Test(groups = {"singleCluster"})
public void latestTest() throws Exception {
bundles[0].setDatasetInstances("latest(-3)", "latest(0)");
- bundles[0].submitFeedsScheduleProcess(prism);
+ AssertUtil.assertSucceeded(bundles[0].submitFeedsScheduleProcess(prism));
InstanceUtil.waitTillInstanceReachState(clusterOC, bundles[0].getProcessName(), 3,
CoordinatorAction.Status.SUCCEEDED, EntityType.PROCESS);
}
@@ -108,7 +107,7 @@ public class ELExpFutureAndLatestTest extends BaseTestClass {
@Test(groups = {"singleCluster"})
public void futureTest() throws Exception {
bundles[0].setDatasetInstances("future(0,10)", "future(3,10)");
- bundles[0].submitFeedsScheduleProcess(prism);
+ AssertUtil.assertSucceeded(bundles[0].submitFeedsScheduleProcess(prism));
InstanceUtil.waitTillInstanceReachState(clusterOC, bundles[0].getProcessName(), 3,
CoordinatorAction.Status.SUCCEEDED, EntityType.PROCESS);
}
http://git-wip-us.apache.org/repos/asf/falcon/blob/0ed1af8c/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELValidationsTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELValidationsTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELValidationsTest.java
index f5664c2..ef5d6d1 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELValidationsTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ELValidationsTest.java
@@ -136,7 +136,7 @@ public class ELValidationsTest extends BaseTestClass {
try {
bundle.setInvalidData();
bundle.setDatasetInstances(startInstance, endInstance);
- String submitResponse = bundle.submitFeedsScheduleProcess(prism);
+ String submitResponse = bundle.submitFeedsScheduleProcess(prism).getMessage();
LOGGER.info("processData in try is: " + Util.prettyPrintXml(bundle.getProcessData()));
TimeUtil.sleepSeconds(45);
if (isMatch) {