You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ra...@apache.org on 2014/10/15 18:48:12 UTC
git commit: FALCON-809 Add message from response if assertSucceeded
fails. Contributed by Ruslan Ostafiychuk
Repository: incubator-falcon
Updated Branches:
refs/heads/master c6cee1137 -> 688fc4557
FALCON-809 Add message from response if assertSucceeded fails. Contributed by Ruslan Ostafiychuk
Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/688fc455
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/688fc455
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/688fc455
Branch: refs/heads/master
Commit: 688fc4557637bb1a12b0f1924a9e7457d94c6968
Parents: c6cee11
Author: Raghav Kumar Gautam <ra...@apache.org>
Authored: Wed Oct 15 09:48:03 2014 -0700
Committer: Raghav Kumar Gautam <ra...@apache.org>
Committed: Wed Oct 15 09:48:03 2014 -0700
----------------------------------------------------------------------
falcon-regression/CHANGES.txt | 2 ++
.../apache/falcon/regression/core/util/AssertUtil.java | 12 ++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/688fc455/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index efd5b39..96d3d37 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -14,6 +14,8 @@ Trunk (Unreleased)
via Samarth Gupta)
IMPROVEMENTS
+ FALCON-809 Add message from response if assertSucceeded fails (Ruslan Ostafiychuk)
+
FALCON-802 Authorization test disabled (Paul Isaychuk)
FALCON-706 Parse json with instances to InstancesResult using joda's DateTime (Ruslan
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/688fc455/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
index c0c5755..569d1f3 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/AssertUtil.java
@@ -158,11 +158,11 @@ public final class AssertUtil {
*/
public static void assertSucceeded(ServiceResponse response) throws JAXBException {
final APIResult apiResult = Util.parseResponse(response);
- Assert.assertEquals(apiResult.getStatus(),
- APIResult.Status.SUCCEEDED, "Status should be SUCCEEDED");
- Assert.assertEquals(apiResult.getStatusCode(), 200,
- "Status code should be 200");
Assert.assertNotNull(apiResult.getMessage(), "Status message is null");
+ Assert.assertEquals(apiResult.getStatus(), APIResult.Status.SUCCEEDED,
+ "Status should be SUCCEEDED. Message: " + apiResult.getMessage());
+ Assert.assertEquals(apiResult.getStatusCode(), 200,
+ "Status code should be 200. Message: " + apiResult.getMessage());
}
/**
@@ -189,9 +189,9 @@ public final class AssertUtil {
* @param response ProcessInstancesResult
*/
public static void assertSucceeded(InstancesResult response) {
- Assert.assertNotNull(response.getMessage());
+ Assert.assertNotNull(response.getMessage(), "Status message is null");
Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED,
- "Status should be SUCCEEDED");
+ "Status should be SUCCEEDED. Message: " + response.getMessage());
}
/**