> On April 23, 2018, 3:05 a.m., Chun-Hung Hsiao wrote: > > src/tests/resource_provider_manager_tests.cpp > > Line 132 (original), 132 (patched) > > <https://reviews.apache.org/r/66310/diff/6/?file=2007713#file2007713line132> > > > > Do you think it is reasonable to always require a registrar, i.e., > > disallow `nullptr` and use `InMemoryStore` here? Please drop this if you > > think we should allow `nullptr`.
There's a trade-off between simpler testing code and internal complexity. In this case I agree with you that we can simplify the implementation of the manager a lot by requiring users to always pass in a registry. Adjusted the code for that, also added some assertions. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66310/#review201711 ----------------------------------------------------------- On April 23, 2018, 1:18 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66310/ > ----------------------------------------------------------- > > (Updated April 23, 2018, 1:18 p.m.) > > > Review request for mesos, Chun-Hung Hsiao, Jie Yu, and Jan Schlicht. > > > Bugs: MESOS-8735 > https://issues.apache.org/jira/browse/MESOS-8735 > > > Repository: mesos > > > Description > ------- > > In order to support recovering resource provider manager information > in the future, we need to adjust the construction of the manager to be > able to consume a registrar. > > This patch lays the groundwork by adjusting interfaces and their > usage; we will make use of the passed on information in a following > patch. > > > Diffs > ----- > > src/resource_provider/manager.hpp bc017fa3998b780cec82718cabe2a8b470a66db2 > src/resource_provider/manager.cpp 68e1866986bfb91bf8355099ee1f0a2a86aba39a > src/resource_provider/registrar.cpp > 92ef9aecb1e93d10f46e53984391558f9901a60b > src/slave/slave.cpp 2b8c6e0771a58efacf26628abae6cbe46380a369 > src/tests/resource_provider_manager_tests.cpp > c52541bf130ccf4795b989b53331176a64a097ea > > > Diff: https://reviews.apache.org/r/66310/diff/7/ > > > Testing > ------- > > `make check` > > > Thanks, > > Benjamin Bannier > >
