You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/03/19 16:52:44 UTC
[5/6] mesos git commit: Fixed some style issues.
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 <yu...@gmail.com>
Authored: Sun Mar 19 09:47:17 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
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<Nothing> 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<string> 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<net::IPNetwork> getNonLoopbackIP()
Try<set<string>> 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<net::IPNetwork> 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() &&