> On Feb. 3, 2016, 10:45 p.m., Michael Park wrote: > > src/tests/resources_tests.cpp, line 957 > > <https://reviews.apache.org/r/42751/diff/2/?file=1231620#file1231620line957> > > > > We used to have a `Resources::size()` function which essentially did > > this, but intentionally removed it so that people don't rely on number of > > `Resource` instances. Is there a reason why we want to check for this? > > > > Here and below.
The # of `Resource` instances is part of the public API of `Resources` (e.g., clients can iterate over every `Resource`). If it is part of the public API, it seems like something it would be worth testing. In this particular case, it doesn't matter that much, but in other test cases (e.g., `AdditionDynamicallyReservedWithDistinctLabels`) it seems useful to check. > On Feb. 3, 2016, 10:45 p.m., Michael Park wrote: > > src/tests/resources_tests.cpp, line 1603 > > <https://reviews.apache.org/r/42751/diff/2/?file=1231620#file1231620line1603> > > > > Can we just add the (same role, different principal) case rather than > > replacing it with the (different role, different principal) case? > > > > For that matter, can we also add the (different role, same principal) > > case? This will be relevant once we have multi-role frameworks I think, > > right? Sure thing. At some point it probably doesn't make sense to test the entire cross-product of different resource properties, but for now it should be fine. - Neil ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42751/#review117698 ----------------------------------------------------------- On Feb. 3, 2016, 5:51 p.m., Neil Conway wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42751/ > ----------------------------------------------------------- > > (Updated Feb. 3, 2016, 5:51 p.m.) > > > Review request for mesos and Michael Park. > > > Repository: mesos > > > Description > ------- > > We should check that two reservations with the same role but different > principals are considered distinct. > > > Diffs > ----- > > src/tests/resources_tests.cpp 4b25e82c13e4f46c73803f773db90f269c09c48a > > Diff: https://reviews.apache.org/r/42751/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Neil Conway > >
