Repository: mesos Updated Branches: refs/heads/master 6a888eff4 -> 94f4f4ebb
Removed an initializer list TODO in libprocess tests. Review: https://reviews.apache.org/r/46030/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/94f4f4eb Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/94f4f4eb Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/94f4f4eb Branch: refs/heads/master Commit: 94f4f4ebb7d491ec6da1473b619600332981dd8e Parents: 6a888ef Author: Neil Conway <neil.con...@gmail.com> Authored: Mon Apr 11 14:18:32 2016 -0700 Committer: Benjamin Mahler <bmah...@apache.org> Committed: Mon Apr 11 14:27:51 2016 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/src/tests/future_tests.cpp | 11 ++++++----- 3rdparty/libprocess/src/tests/process_tests.cpp | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/94f4f4eb/3rdparty/libprocess/src/tests/future_tests.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/tests/future_tests.cpp b/3rdparty/libprocess/src/tests/future_tests.cpp index c2eeb0e..8a21c6d 100644 --- a/3rdparty/libprocess/src/tests/future_tests.cpp +++ b/3rdparty/libprocess/src/tests/future_tests.cpp @@ -466,11 +466,12 @@ TEST(FutureTest, Select) Promise<int> promise3; Promise<int> promise4; - std::set<Future<int>> futures; - futures.insert(promise1.future()); - futures.insert(promise2.future()); - futures.insert(promise3.future()); - futures.insert(promise4.future()); + std::set<Future<int>> futures = { + promise1.future(), + promise2.future(), + promise3.future(), + promise4.future() + }; promise1.set(42); http://git-wip-us.apache.org/repos/asf/mesos/blob/94f4f4eb/3rdparty/libprocess/src/tests/process_tests.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/tests/process_tests.cpp b/3rdparty/libprocess/src/tests/process_tests.cpp index e8ee8ee..274a76f 100644 --- a/3rdparty/libprocess/src/tests/process_tests.cpp +++ b/3rdparty/libprocess/src/tests/process_tests.cpp @@ -1409,12 +1409,12 @@ TEST(ProcessTest, FirewallDisablePaths) { const string id = "testprocess"; - // TODO(arojas): Add initilization list construction when available. - hashset<string> endpoints; - endpoints.insert(path::join("", id, "handler1")); - endpoints.insert(path::join("", id, "handler2/nested")); - // Patterns are not supported, so this should do nothing. - endpoints.insert(path::join("", id, "handler3/*")); + hashset<string> endpoints = { + path::join("", id, "handler1"), + path::join("", id, "handler2/nested"), + // Patterns are not supported, so this should do nothing. + path::join("", id, "handler3/*") + }; process::firewall::install( {Owned<FirewallRule>(new DisabledEndpointsFirewallRule(endpoints))}); @@ -1494,10 +1494,10 @@ TEST(ProcessTest, FirewallUninstall) { const string id = "testprocess"; - // TODO(arojas): Add initilization list construction when available. - hashset<string> endpoints; - endpoints.insert(path::join("", id, "handler1")); - endpoints.insert(path::join("", id, "handler2")); + hashset<string> endpoints = { + path::join("", id, "handler1"), + path::join("", id, "handler2") + }; process::firewall::install( {Owned<FirewallRule>(new DisabledEndpointsFirewallRule(endpoints))});