> On April 20, 2019, 6:38 p.m., Benjamin Mahler wrote: > > src/tests/master_validation_tests.cpp > > Lines 456-459 (patched) > > <https://reviews.apache.org/r/70472/diff/3/?file=2140369#file2140369line456> > > > > Maybe we can make this more succinct by removing the extra variables? > > > > ``` > > Resources resources1 = CHECK_NOTERROR( > > Resources::parse("cpus:0.1;mem:32;disk:32;zones:{a,b,c}")); > > > > ... > > ``` > > > > vs > > > > ``` > > Try<Resources> resources1_ = > > Resources::parse("cpus:0.1;mem:32;disk:32;zones:{a,b,c}"); > > ASSERT_SOME(resources1_); > > Resources resources1 = resources1_.get(); > > > > ... > > ``` > > > > The former seems more readable?
Thanks for the comments! I split out the tests into a subsequent patch in the chain, and implemented the suggestions in your comments. - Greg ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70472/#review214777 ----------------------------------------------------------- On April 20, 2019, 7:14 p.m., Greg Mann wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70472/ > ----------------------------------------------------------- > > (Updated April 20, 2019, 7:14 p.m.) > > > Review request for mesos, Benno Evers, Benjamin Mahler, Gastón Kleiman, and > Meng Zhu. > > > Bugs: MESOS-9619 > https://issues.apache.org/jira/browse/MESOS-9619 > > > Repository: mesos > > > Description > ------- > > This patch adds validation to the master to ensure that task > groups do not include resources with overlapping set- or > range-valued resources, as this can crash the allocator. > > > Diffs > ----- > > src/master/validation.hpp 71748c121aa3518d68811ea1e60707d195b58657 > src/master/validation.cpp f032a781608857d0c9cfa220dd8d70f74d60f1ec > > > Diff: https://reviews.apache.org/r/70472/diff/4/ > > > Testing > ------- > > Testing details at the end of this chain. > > > Thanks, > > Greg Mann > >