Return-Path: X-Original-To: apmail-mesos-issues-archive@minotaur.apache.org Delivered-To: apmail-mesos-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D1BB718322 for ; Fri, 17 Jul 2015 13:52:04 +0000 (UTC) Received: (qmail 65911 invoked by uid 500); 17 Jul 2015 13:52:04 -0000 Delivered-To: apmail-mesos-issues-archive@mesos.apache.org Received: (qmail 65879 invoked by uid 500); 17 Jul 2015 13:52:04 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 65868 invoked by uid 99); 17 Jul 2015 13:52:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2015 13:52:04 +0000 Date: Fri, 17 Jul 2015 13:52:04 +0000 (UTC) From: "Klaus Ma (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MESOS-3023) Factoring out the pattern for URL generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MESOS-3023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14631364#comment-14631364 ] Klaus Ma commented on MESOS-3023: --------------------------------- Hi [~haosdent], I just go through the code, I found we have process::http::URL already for url. And we can get the url string by operator<< instead of a new function. I updated the code diff by using process::http::URL in UT. Anyway, your comments is very useful to me :). Thanks Klaus > Factoring out the pattern for URL generation > --------------------------------------------- > > Key: MESOS-3023 > URL: https://issues.apache.org/jira/browse/MESOS-3023 > Project: Mesos > Issue Type: Task > Reporter: Artem Harutyunyan > Assignee: Klaus Ma > Priority: Minor > Labels: beginner, mesosphere, newbie > > fetcher_test.cpp uses the following code for generating URLs: > string url = "http://" + net::getHostname(process.self().address.ip).get() + ":" + stringify(process.self().address.port) + "/" + process.self().id > it would be good to isolate that code in a function, and replace the code above with something like: > string url = "http://" + endpoint_url(process, "uri_test"); -- This message was sent by Atlassian JIRA (v6.3.4#6332)