----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70390/#review214385 -----------------------------------------------------------
Fix it, then Ship it! Does this test fail on master prior to the fixes? src/tests/hierarchical_allocator_tests.cpp Lines 6176-6178 (patched) <https://reviews.apache.org/r/70390/#comment300576> just as an FYI, when I read this I was expecting it would test: "a" <-- has quota "a/b" (where it ensures that "a/b"'s allocation counts towards "a"'s quota) I guess we don't have a test for this, but it looks like a variant of 'QuotaWithNestedRoleReservation' will accomplish it. Maybe call this one QuotaHeadroomWithNested... src/tests/hierarchical_allocator_tests.cpp Lines 6180-6186 (patched) <https://reviews.apache.org/r/70390/#comment300579> Simple numbers like "cpus:1;mem:100" seem to make the tests easier to read, any reason not to do that? src/tests/hierarchical_allocator_tests.cpp Lines 6180-6193 (patched) <https://reviews.apache.org/r/70390/#comment300585> I found that while debugging some of these tests, the "imperative" style of explaining them (e.g. do x then y then x) makes the tests a bit tougher to understand, and that "declarative" explanations might be more readable? E.g. ``` // Setup: // agents: 2 * R // roles: "a" --> allocated R // "a/b" --> allocated R // "quota-role" --> guarantee R w/ no framework // // Test: Add 1 more agent with R. // Ensure agent is held back for "quota-role". // Add 1 more agent with R. // Ensure only 1 of the two extra agents goes to "a" or "a/b" // (since there is enough headroom for "quota-role") ``` Here I can more easily see what setup state looks like and what is then tested off of that setup. src/tests/hierarchical_allocator_tests.cpp Lines 6199-6200 (patched) <https://reviews.apache.org/r/70390/#comment300590> I realize it's not just this test, but this brace syntax but it seems less readable than: const string CHILD_ROLE = "a/b"; Does that not compile? src/tests/hierarchical_allocator_tests.cpp Lines 6221 (patched) <https://reviews.apache.org/r/70390/#comment300588> parent role? src/tests/hierarchical_allocator_tests.cpp Lines 6241 (patched) <https://reviews.apache.org/r/70390/#comment300586> quota-role? - Benjamin Mahler On April 4, 2019, 8:31 p.m., Meng Zhu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70390/ > ----------------------------------------------------------- > > (Updated April 4, 2019, 8:31 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Repository: mesos > > > Description > ------- > > This test verifies that the headroom accounting is correct in the > presence of subrole allocation. In particular, we need to ensure > that a subrole's allocation is accounted only once (not multiple > times in itself as well as all of its ancestors) when calculating > available the quota headroom. > > > Diffs > ----- > > src/tests/hierarchical_allocator_tests.cpp > c7edee2f49bfac0796c9506265d3bb766416ee63 > > > Diff: https://reviews.apache.org/r/70390/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Meng Zhu > >
