Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6B0A7200C37 for ; Sun, 19 Mar 2017 17:52:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 69973160B7D; Sun, 19 Mar 2017 16:52:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B60DC160B6D for ; Sun, 19 Mar 2017 17:52:46 +0100 (CET) Received: (qmail 36489 invoked by uid 500); 19 Mar 2017 16:52:40 -0000 Mailing-List: contact commits-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 commits@mesos.apache.org Received: (qmail 36309 invoked by uid 99); 19 Mar 2017 16:52:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Mar 2017 16:52:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1F754DFF71; Sun, 19 Mar 2017 16:52:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jieyu@apache.org To: commits@mesos.apache.org Date: Sun, 19 Mar 2017 16:52:44 -0000 Message-Id: <42047ea9fdcc4d13886600e2371c2fd5@git.apache.org> In-Reply-To: <2a8840938d904248a927d69597f1c2bd@git.apache.org> References: <2a8840938d904248a927d69597f1c2bd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [5/6] mesos git commit: Fixed some style issues. archived-at: Sun, 19 Mar 2017 16:52:47 -0000 Fixed some style issues. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/48e79f50 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/48e79f50 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/48e79f50 Branch: refs/heads/master Commit: 48e79f50022be8da8c9c62cca245c444046b0a11 Parents: 2467fa4 Author: Jie Yu Authored: Sun Mar 19 09:47:17 2017 -0700 Committer: Jie Yu Committed: Sun Mar 19 09:47:17 2017 -0700 ---------------------------------------------------------------------- src/tests/containerizer/cni_isolator_tests.cpp | 16 ++++++++-------- src/tests/utils.cpp | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/48e79f50/src/tests/containerizer/cni_isolator_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/containerizer/cni_isolator_tests.cpp b/src/tests/containerizer/cni_isolator_tests.cpp index d30f251..4940fc8 100644 --- a/src/tests/containerizer/cni_isolator_tests.cpp +++ b/src/tests/containerizer/cni_isolator_tests.cpp @@ -1064,7 +1064,6 @@ TEST_F(CniIsolatorPortMapperTest, ROOT_INETERNET_CURL_PortMapper) // Augment the CNI plugins search path so that the `network/cni` // isolator can find the port-mapper CNI plugin. flags.network_cni_plugins_dir = cniPluginDir + ":" + getLauncherDir(); - flags.network_cni_config_dir = cniConfigDir; // Need to increase the registration timeout to give time for @@ -1079,7 +1078,10 @@ TEST_F(CniIsolatorPortMapperTest, ROOT_INETERNET_CURL_PortMapper) MockScheduler sched; MesosSchedulerDriver driver( - &sched, DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL); + &sched, + DEFAULT_FRAMEWORK_INFO, + master.get()->pid, + DEFAULT_CREDENTIAL); EXPECT_CALL(sched, registered(&driver, _, _)); @@ -1103,9 +1105,7 @@ TEST_F(CniIsolatorPortMapperTest, ROOT_INETERNET_CURL_PortMapper) // Select a random port from the offer. std::srand(std::time(0)); - Value::Range ports = resources.ports()->range(0); - uint16_t hostPort = ports.begin() + std::rand() % (ports.end() - ports.begin() + 1); @@ -1176,8 +1176,8 @@ TEST_F(CniIsolatorPortMapperTest, ROOT_INETERNET_CURL_PortMapper) EXPECT_CALL(sched, statusUpdate(&driver, _)) .WillOnce(FutureArg<1>(&statusKilled)); - // Wait for the executor to exit. We are using 'gc.schedule' as a proxy event - // to monitor the exit of the executor. + // Wait for the executor to exit. We are using 'gc.schedule' as a + // proxy event to monitor the exit of the executor. Future gcSchedule = FUTURE_DISPATCH( _, &slave::GarbageCollectorProcess::schedule); @@ -1197,8 +1197,8 @@ TEST_F(CniIsolatorPortMapperTest, ROOT_INETERNET_CURL_PortMapper) // Make sure the iptables chain `MESOS-TEST-PORT-MAPPER-CHAIN` // doesn't have any iptable rules once the task is killed. The only - // rule that should exist in this chain is the - // `-N MESOS-TEST-PORT-MAPPER-CHAIN` rule. + // rule that should exist in this chain is the `-N + // MESOS-TEST-PORT-MAPPER-CHAIN` rule. Try rules = os::shell( "iptables -w -t nat -S " + stringify(MESOS_TEST_PORT_MAPPER_CHAIN) + "| wc -l"); http://git-wip-us.apache.org/repos/asf/mesos/blob/48e79f50/src/tests/utils.cpp ---------------------------------------------------------------------- diff --git a/src/tests/utils.cpp b/src/tests/utils.cpp index 4109b8f..053976d 100644 --- a/src/tests/utils.cpp +++ b/src/tests/utils.cpp @@ -197,7 +197,8 @@ Try getNonLoopbackIP() Try> links = net::links(); if (links.isError()) { return Error( - "Unable to retrieve interfaces on this host: " + links.error()); + "Unable to retrieve interfaces on this host: " + + links.error()); } foreach (const string& link, links.get()) { @@ -206,7 +207,8 @@ Try getNonLoopbackIP() if (hostIPNetwork.isError()) { return Error( - "Unable to find a non-loopback address: " + hostIPNetwork.error()); + "Unable to find a non-loopback address: " + + hostIPNetwork.error()); } if (hostIPNetwork.isSome() &&