----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60847/#review180487 -----------------------------------------------------------
src/tests/slave_tests.cpp Line 2368 (original), 2368 (patched) <https://reviews.apache.org/r/60847/#comment255685> Let's explain a bit more: "Create two executors so that we can launch tasks in two separate containers." src/tests/slave_tests.cpp Line 2408 (original), 2441 (patched) <https://reviews.apache.org/r/60847/#comment255690> Could we use `offers->front().id()` instead here? src/tests/slave_tests.cpp Lines 2416-2417 (original), 2467-2470 (patched) <https://reviews.apache.org/r/60847/#comment255699> Split this into two EXPECT_CALL invocations; one here and one below for the second request. src/tests/slave_tests.cpp Lines 2419-2434 (original), 2472-2504 (patched) <https://reviews.apache.org/r/60847/#comment255697> This formatting is a bit hard to read. How about: ``` // Construct the container statuses to be returned. Note that // these container IDs will be different than the actual container // IDs assigned by the agent, but creating them here allows us to // easily confirm the output of '/containers'. ContainerStatus containerStatus1; ContainerStatus containerStatus2; { ContainerID parent; parent.set_value("parent"); ContainerID child; child.set_value("child1"); child.mutable_parent()->CopyFrom(parent); containerStatus1.mutable_container_id()->CopyFrom(child); CgroupInfo* cgroupInfo = containerStatus1.mutable_cgroup_info(); CgroupInfo::NetCls* netCls1 = cgroupInfo->mutable_net_cls(); netCls->set_classid(42); NetworkInfo* networkInfo = containerStatus1.add_network_infos(); NetworkInfo::IPAddress* ipAddr = networkInfo->add_ip_addresses(); ipAddr->set_ip_address("192.168.1.20"); } { ContainerID child; child.set_value("child2"); child.mutable_parent()->CopyFrom(parent); containerStatus2.mutable_container_id()->CopyFrom(child); CgroupInfo* cgroupInfo = containerStatus1.mutable_cgroup_info(); CgroupInfo::NetCls* netCls = cgroupInfo->mutable_net_cls(); netCls->set_classid(42); NetworkInfo* networkInfo = containerStatus2.add_network_infos(); NetworkInfo::IPAddress* ipAddr = networkInfo->add_ip_addresses(); ipAddr->set_ip_address("192.168.1.21"); } ``` src/tests/slave_tests.cpp Lines 2436-2437 (original), 2506-2510 (patched) <https://reviews.apache.org/r/60847/#comment255698> Split this into two `EXPECT_CALL` invocations. One here, and another one below. src/tests/slave_tests.cpp Lines 2614 (patched) <https://reviews.apache.org/r/60847/#comment255684> containerId1->value() here and elsewhere - Greg Mann On July 13, 2017, 9:11 p.m., Quinn Leng wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60847/ > ----------------------------------------------------------- > > (Updated July 13, 2017, 9:11 p.m.) > > > Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and > Vinod Kone. > > > Bugs: MESOS-7630 > https://issues.apache.org/jira/browse/MESOS-7630 > > > Repository: mesos > > > Description > ------- > > Added query parameter test cases for '/slaves' and '/frameworks' on > the master, and '/containers' endpoint on the agent. > > > Diffs > ----- > > src/tests/master_tests.cpp 6e6461c2e13c3eb055aa3c2d8ad8e3ac54a1d197 > src/tests/slave_tests.cpp 035db18db3a64a9e358c1c54cc18a4bdeb85d8bf > > > Diff: https://reviews.apache.org/r/60847/diff/1/ > > > Testing > ------- > > Passed 'make check -j48' > Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check > -j48' > Passed 'GLOG_v=1 ./bin/mesos-tests.sh > --gtest_filter="MasterTest.FrameworksEndpointQueryFramework" > --gtest_repeat=1000 --gtest_break_on_failure' > Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48' > Passed 'GLOG_v=1 ./bin/mesos-tests.sh > --gtest_filter="MasterTest.SlavesEndpointQuerySlave" --gtest_repeat=1000 > --gtest_break_on_failure' > > > Thanks, > > Quinn Leng > >