----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12341/#review23169 -----------------------------------------------------------
Can you provide some context for the use of '=' vs ':' in the resource strings? "cpus=45.55 (*); ports=[10000-20000, 30000-50000] (*); disks={sda1} (*)" vs. "cpus:45.55 (*); ports:[10000-20000, 30000-50000] (*); disks:{sda1} (*)" src/common/resources.cpp <https://reviews.apache.org/r/12341/#comment47024> foreach? src/tests/resources_tests.cpp <https://reviews.apache.org/r/12341/#comment47029> EXPECT? src/tests/resources_tests.cpp <https://reviews.apache.org/r/12341/#comment47030> EXPECT? src/tests/resources_tests.cpp <https://reviews.apache.org/r/12341/#comment47025> EXPECT_ERROR here and elsewhere, then you don't need to store the Try at all :) src/tests/resources_tests.cpp <https://reviews.apache.org/r/12341/#comment47026> EXPECT_NE, using it will then show the expected vs. actual in the test failure output (so long as they both have output stream operators). src/tests/resources_tests.cpp <https://reviews.apache.org/r/12341/#comment47028> EXPECT_LE src/tests/resources_tests.cpp <https://reviews.apache.org/r/12341/#comment47027> Can you use EXPECT_LE? - Ben Mahler On July 15, 2013, 6:36 p.m., Thomas Marshall wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12341/ > ----------------------------------------------------------- > > (Updated July 15, 2013, 6:36 p.m.) > > > Review request for mesos and Benjamin Hindman. > > > Bugs: MESOS-505 > https://issues.apache.org/jira/browse/MESOS-505 > > > Repository: mesos > > > Description > ------- > > Adds parsing of roles to the Resources class. Also updates parse to return a > Try, in the case that parsing fails, and adds tests for role parsing and for > Resources operators in the presence of roles. > > > Diffs > ----- > > src/common/resources.hpp 42dfb6a > src/common/resources.cpp 8bc1057 > src/master/drf_sorter.cpp 510acc3 > src/slave/slave.cpp 9a2c671 > src/tests/gc_tests.cpp 1745800 > src/tests/master_tests.cpp 5ac4d5f > src/tests/resource_offers_tests.cpp beab2d8 > src/tests/resources_tests.cpp 67a11b3 > src/tests/slave_recovery_tests.cpp b0843d7 > src/tests/sorter_tests.cpp 619e786 > > Diff: https://reviews.apache.org/r/12341/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Thomas Marshall > >