----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42588/#review117641 -----------------------------------------------------------
src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 176) <https://reviews.apache.org/r/42588/#comment178898> Why Result here? When None() will be returned? Should this just be a Try here? src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 182) <https://reviews.apache.org/r/42588/#comment178897> Ditto on using explicit check. src/slave/containerizer/mesos/isolators/cgroups/net_cls.cpp (line 187) <https://reviews.apache.org/r/42588/#comment178899> No need for this temp variable. src/tests/containerizer/isolator_tests.cpp (line 379) <https://reviews.apache.org/r/42588/#comment178903> I would suggest we create smaller tests, each of which test one specific part of the code. For intance, the first test can just do an alloc on a primary and make sure it's used (isUsed). The second test tests the free. In other words, do an alloc and a free, make sure isUsed returns false. Finally, test the full case, make sure alloc returns an Error. src/tests/containerizer/isolator_tests.cpp (lines 398 - 399) <https://reviews.apache.org/r/42588/#comment178900> No need for error message for assertions/expectations. Simply do: ``` ASSERT_SOME(handle); ``` src/tests/containerizer/isolator_tests.cpp (lines 404 - 407) <https://reviews.apache.org/r/42588/#comment178901> Kill. src/tests/containerizer/isolator_tests.cpp (lines 409 - 411) <https://reviews.apache.org/r/42588/#comment178902> Kill. - Jie Yu On Feb. 3, 2016, 7:11 a.m., Avinash sridharan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42588/ > ----------------------------------------------------------- > > (Updated Feb. 3, 2016, 7:11 a.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 > >