You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/04/04 08:19:56 UTC
[3/3] mesos git commit: Added HTTP response related macros
`AWAIT_ASSERT_RESPONSE_*`.
Added HTTP response related macros `AWAIT_ASSERT_RESPONSE_*`.
This RR is the item (3) for MESOS-4112. It adds HTTP respose
related macros that were not defined before:
1. `AWAIT_ASSERT_RESPONSE_STATUS_EQ_FOR`
2. `AWAIT_ASSERT_RESPONSE_STATUS_EQ`
3. `AWAIT_ASSERT_RESPONSE_BODY_EQ_FOR`
4. `AWAIT_ASSERT_RESPONSE_BODY_EQ`
5. `AWAIT_ASSERT_RESPONSE_HEADER_EQ_FOR`
6. `AWAIT_ASSERT_RESPONSE_HEADER_EQ`
NOTE: The above are the counterpart of `AWAIT_EXPECT_RESPONSE_*`
Review: https://reviews.apache.org/r/45357/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f921302b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f921302b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f921302b
Branch: refs/heads/master
Commit: f921302b0a0d7c37ba1205ad12857ade614d04ff
Parents: bbd0d2f
Author: Yong Tang <yo...@outlook.com>
Authored: Sun Apr 3 19:31:30 2016 -0700
Committer: Michael Park <mp...@apache.org>
Committed: Sun Apr 3 23:16:13 2016 -0700
----------------------------------------------------------------------
3rdparty/libprocess/include/process/gtest.hpp | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/f921302b/3rdparty/libprocess/include/process/gtest.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/gtest.hpp b/3rdparty/libprocess/include/process/gtest.hpp
index 14b49ad..3e08872 100644
--- a/3rdparty/libprocess/include/process/gtest.hpp
+++ b/3rdparty/libprocess/include/process/gtest.hpp
@@ -383,6 +383,14 @@ inline ::testing::AssertionResult AwaitAssertResponseStatusEq(
}
+#define AWAIT_ASSERT_RESPONSE_STATUS_EQ_FOR(expected, actual, duration) \
+ ASSERT_PRED_FORMAT3(AwaitAssertResponseStatusEq, expected, actual, duration)
+
+
+#define AWAIT_ASSERT_RESPONSE_STATUS_EQ(expected, actual) \
+ AWAIT_ASSERT_RESPONSE_STATUS_EQ_FOR(expected, actual, Seconds(15))
+
+
#define AWAIT_EXPECT_RESPONSE_STATUS_EQ_FOR(expected, actual, duration) \
EXPECT_PRED_FORMAT3(AwaitAssertResponseStatusEq, expected, actual, duration)
@@ -418,6 +426,14 @@ inline ::testing::AssertionResult AwaitAssertResponseBodyEq(
}
+#define AWAIT_ASSERT_RESPONSE_BODY_EQ_FOR(expected, actual, duration) \
+ ASSERT_PRED_FORMAT3(AwaitAssertResponseBodyEq, expected, actual, duration)
+
+
+#define AWAIT_ASSERT_RESPONSE_BODY_EQ(expected, actual) \
+ AWAIT_ASSERT_RESPONSE_BODY_EQ_FOR(expected, actual, Seconds(15))
+
+
#define AWAIT_EXPECT_RESPONSE_BODY_EQ_FOR(expected, actual, duration) \
EXPECT_PRED_FORMAT3(AwaitAssertResponseBodyEq, expected, actual, duration)
@@ -459,6 +475,14 @@ inline ::testing::AssertionResult AwaitAssertResponseHeaderEq(
}
+#define AWAIT_ASSERT_RESPONSE_HEADER_EQ_FOR(expected, key, actual, duration) \
+ ASSERT_PRED_FORMAT4(AwaitAssertResponseHeaderEq, expected, key, actual, duration) // NOLINT(whitespace/line_length)
+
+
+#define AWAIT_ASSERT_RESPONSE_HEADER_EQ(expected, key, actual) \
+ AWAIT_ASSERT_RESPONSE_HEADER_EQ_FOR(expected, key, actual, Seconds(15))
+
+
#define AWAIT_EXPECT_RESPONSE_HEADER_EQ_FOR(expected, key, actual, duration) \
EXPECT_PRED_FORMAT4(AwaitAssertResponseHeaderEq, expected, key, actual, duration) // NOLINT(whitespace/line_length)