You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2015/08/03 10:22:39 UTC
mesos git commit: Factored out the pattern for URL generation in
(another) fetcher test.
Repository: mesos
Updated Branches:
refs/heads/master f4d8dc345 -> 9c905880a
Factored out the pattern for URL generation in (another) fetcher test.
Review: https://reviews.apache.org/r/36946
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9c905880
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9c905880
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9c905880
Branch: refs/heads/master
Commit: 9c905880abc02e064f0430afab12afa6073549c8
Parents: f4d8dc3
Author: Artem Harutyunyan <ar...@mesosphere.io>
Authored: Mon Aug 3 10:22:15 2015 +0200
Committer: Bernd Mathiske <be...@mesosphere.io>
Committed: Mon Aug 3 10:22:15 2015 +0200
----------------------------------------------------------------------
src/tests/fetcher_tests.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9c905880/src/tests/fetcher_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fetcher_tests.cpp b/src/tests/fetcher_tests.cpp
index 3ded3c0..81e7036 100644
--- a/src/tests/fetcher_tests.cpp
+++ b/src/tests/fetcher_tests.cpp
@@ -338,11 +338,13 @@ TEST_F(FetcherTest, OSNetUriSpaceTest)
spawn(process);
- // A URL with a bunch of leading whitespace characters.
- string url = " \t \n http://" +
- net::getHostname(process.self().address.ip).get() + ":" +
- stringify(process.self().address.port) +
- "/" + process.self().id + "/test";
+ const network::Address& address = process.self().address;
+
+ process::http::URL url(
+ "http",
+ address.ip,
+ address.port,
+ path::join(process.self().id, "test"));
string localFile = path::join(os::getcwd(), "test");
EXPECT_FALSE(os::exists(localFile));
@@ -357,7 +359,8 @@ TEST_F(FetcherTest, OSNetUriSpaceTest)
CommandInfo commandInfo;
CommandInfo::URI* uri = commandInfo.add_uris();
- uri->set_value(url);
+ // Add whitespace characters to the beginning of the URL.
+ uri->set_value("\r\n\t " + stringify(url));
Fetcher fetcher;
SlaveID slaveId;