> On Jan. 26, 2017, 5:05 a.m., Guangya Liu wrote: > > src/tests/hierarchical_allocator_tests.cpp, line 948 > > <https://reviews.apache.org/r/55868/diff/1/?file=1613285#file1613285line948> > > > > I saw that you removed all of this `ASSERT_EQ` in the following tests, > > any reason you want do this?
Yes, they are no longer needed now that we are doing allocation equality. > On Jan. 26, 2017, 5:05 a.m., Guangya Liu wrote: > > src/tests/hierarchical_allocator_tests.cpp, line 1091 > > <https://reviews.apache.org/r/55868/diff/1/?file=1613285#file1613285line1091> > > > > How about move this right before `unreserved` under #1089? Hm.. it seems clearer to have reserved and unreserved defined together? > On Jan. 26, 2017, 5:05 a.m., Guangya Liu wrote: > > src/tests/hierarchical_allocator_tests.cpp, line 4488 > > <https://reviews.apache.org/r/55868/diff/1/?file=1613285#file1613285line4488> > > > > s/allocations/offers Nice catch! Thanks! > On Jan. 26, 2017, 5:05 a.m., Guangya Liu wrote: > > src/tests/hierarchical_allocator_tests.cpp, lines 1505-1507 > > <https://reviews.apache.org/r/55868/diff/1/?file=1613285#file1613285line1505> > > > > How about move this right before the `update` used right before #1447 > > as before? It's moved up to ensure that it's valid before we send it to the allocator. > On Jan. 26, 2017, 5:05 a.m., Guangya Liu wrote: > > src/tests/hierarchical_allocator_tests.cpp, line 1623 > > <https://reviews.apache.org/r/55868/diff/1/?file=1613285#file1613285line1623> > > > > Why not put this right before #1507 and use `allocation` for #1511 and > > #1522 as > > > > ``` > > AWAIT_EXPECT_EQ(expected, allocation); > > ``` > > > > Ditto for the following places. The code doesn't need the allocation, so I could have written this as: ``` EXPECT_TRUE(allocations.get().isPending()); ``` But the following seemed a bit clearer to read: ``` Future<Allocation> allocation = allocations.get(); EXPECT_TRUE(allocation.isPending()); ``` - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55868/#review163087 ----------------------------------------------------------- On Jan. 24, 2017, 2:31 a.m., Benjamin Mahler wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55868/ > ----------------------------------------------------------- > > (Updated Jan. 24, 2017, 2:31 a.m.) > > > Review request for mesos and Michael Park. > > > Repository: mesos > > > Description > ------- > > This was necessary to greatly simplify the changes needed to the > allocator tests as we introduce support for multi-role frameworks. > > The main improvement here is to establish and use equality on the > `Allocation` struct, which makes the tests more readable and avoids > the manual probing of the allocation structure across all the tests. > > > Diffs > ----- > > src/tests/hierarchical_allocator_tests.cpp > 1edd0ecc8a93cd41532e1cf3641f67c780ab23a5 > > Diff: https://reviews.apache.org/r/55868/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Mahler > >
