You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2016/11/25 11:02:07 UTC

[2/4] mesos git commit: Introduced process using declarations to "tests/utils.cpp".

Introduced process using declarations to "tests/utils.cpp".

Review: https://reviews.apache.org/r/53986/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5f84a472
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5f84a472
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5f84a472

Branch: refs/heads/master
Commit: 5f84a472e6d716b87304dc6f22ba762dce461cef
Parents: e30fb8a
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Fri Nov 25 11:44:08 2016 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Fri Nov 25 11:44:08 2016 +0100

----------------------------------------------------------------------
 src/tests/utils.cpp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5f84a472/src/tests/utils.cpp
----------------------------------------------------------------------
diff --git a/src/tests/utils.cpp b/src/tests/utils.cpp
index 7dd2069..c7769cf 100644
--- a/src/tests/utils.cpp
+++ b/src/tests/utils.cpp
@@ -32,6 +32,12 @@
 
 using std::string;
 
+using process::Future;
+using process::UPID;
+using process::address;
+
+namespace http = process::http;
+
 namespace mesos {
 namespace internal {
 namespace tests {
@@ -44,15 +50,14 @@ const bool searchInstallationDirectory = false;
 
 JSON::Object Metrics()
 {
-  process::UPID upid("metrics", process::address());
+  UPID upid("metrics", address());
 
   // TODO(neilc): This request might timeout if the current value of a
   // metric cannot be determined. In tests, a common cause for this is
   // MESOS-6231 when multiple scheduler drivers are in use.
-  process::Future<process::http::Response> response =
-    process::http::get(upid, "snapshot");
+  Future<http::Response> response = http::get(upid, "snapshot");
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(process::http::OK().status, response);
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(http::OK().status, response);
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
 
   Try<JSON::Object> parse = JSON::parse<JSON::Object>(response.get().body);