----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42588/#review117857 -----------------------------------------------------------
src/tests/containerizer/isolator_tests.cpp (lines 374 - 395) <https://reviews.apache.org/r/42588/#comment179116> Hum, I don't think this test fixture is needed. Just create handleManager in each test. ``` NetClsHandleManager manager( (Bound<uint16_t>::closed(2), Bound<uint16_t>::closed(3)); for (int primary = 2; primary <= 3; primary++) { ... } for (int primary = 2; primary <= 3; primary++) { ... } ``` src/tests/containerizer/isolator_tests.cpp (lines 411 - 412) <https://reviews.apache.org/r/42588/#comment179117> These two can be combined into: ``` EXPECT_SOME_TRUE(manager->isUsed(handle.get()); ``` src/tests/containerizer/isolator_tests.cpp (lines 414 - 415) <https://reviews.apache.org/r/42588/#comment179119> Hum, this is too implicit. Why do you need the inner loop? In fact, I would suggest that we don't use the outer loop as well. Just test the single primary case. src/tests/containerizer/isolator_tests.cpp (line 443) <https://reviews.apache.org/r/42588/#comment179120> No need for the loop here. Just pick a primary that's not within the range. src/tests/containerizer/isolator_tests.cpp (line 452) <https://reviews.apache.org/r/42588/#comment179121> No need for the loop here. just pick a primary. src/tests/containerizer/isolator_tests.cpp (line 453) <https://reviews.apache.org/r/42588/#comment179123> No need for this as well. Just pick a secondary. - Jie Yu On Feb. 4, 2016, 6:18 p.m., Avinash sridharan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42588/ > ----------------------------------------------------------- > > (Updated Feb. 4, 2016, 6:18 p.m.) > > > Review request for mesos and Jie Yu. > > > Bugs: MESOS-4345 > https://issues.apache.org/jira/browse/MESOS-4345 > > > Repository: mesos > > > Description > ------- > > Added unit-test for `NetClsHandleManager`. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/cgroups/net_cls.hpp > b4bc52114389d1c1efce2830f4292bd89bb0de7c > src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp > ddc1bf0939e5e8995e6f34fe7b8509b51704f63e > src/tests/containerizer/isolator_tests.cpp > 8d101df957fd36adac388310eddba2db1f98c029 > > Diff: https://reviews.apache.org/r/42588/diff/ > > > Testing > ------- > > make and make check. > > > Thanks, > > Avinash sridharan > >
