----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41672/#review114688 -----------------------------------------------------------
Looking good. A few code changes, but mostly grammar nitpicking/suggestions. src/tests/hierarchical_allocator_tests.cpp (line 2146) <https://reviews.apache.org/r/41672/#comment175551> s/which contains/with/ src/tests/hierarchical_allocator_tests.cpp (line 2175) <https://reviews.apache.org/r/41672/#comment175550> You could instead say `QUADRUPLE`, but I actually like the sound of `FOURFOLD`. src/tests/hierarchical_allocator_tests.cpp (line 2220) <https://reviews.apache.org/r/41672/#comment175552> s/there/therefore/ src/tests/hierarchical_allocator_tests.cpp (line 2221) <https://reviews.apache.org/r/41672/#comment175553> s/ratio is/ratio of/ src/tests/hierarchical_allocator_tests.cpp (line 224) <https://reviews.apache.org/r/41672/#comment175554> `static`? Or is that so obvious the compiler will pick it up on its own? src/tests/hierarchical_allocator_tests.cpp (lines 2093 - 2096) <https://reviews.apache.org/r/41672/#comment175555> We rarely (only 67 times) use `unsigned`. Usually it's `int` (909 times) for signed values (or values where sign is irrelevant), or `uint##_t` for unsigned values of a particular size (e.g. 401 `uint64_t`s). src/tests/hierarchical_allocator_tests.cpp (line 2100) <https://reviews.apache.org/r/41672/#comment175556> const? (since you're going ALL_CAPS) Actually, why is this even a variable if it's only used in one place below? src/tests/hierarchical_allocator_tests.cpp (line 2118) <https://reviews.apache.org/r/41672/#comment175557> s/have/having/ src/tests/hierarchical_allocator_tests.cpp (line 2136) <https://reviews.apache.org/r/41672/#comment175558> Because each framework's role has a weight of 1.0 by default,... src/tests/hierarchical_allocator_tests.cpp (line 2139) <https://reviews.apache.org/r/41672/#comment175559> Let's define all of these together up at the top. src/tests/hierarchical_allocator_tests.cpp (line 2151) <https://reviews.apache.org/r/41672/#comment175560> s/for the next time allocation/so they can be offered again next time./ src/tests/hierarchical_allocator_tests.cpp (line 2171) <https://reviews.apache.org/r/41672/#comment175561> Now that the frameworks' weights are 1:2,... src/tests/hierarchical_allocator_tests.cpp (line 2172) <https://reviews.apache.org/r/41672/#comment175562> s/all resources are also offered by 1:2/resources are offered with a ratio of 1:2/ - Adam B On Jan. 12, 2016, 6:56 a.m., Yongqiao Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41672/ > ----------------------------------------------------------- > > (Updated Jan. 12, 2016, 6:56 a.m.) > > > Review request for mesos, Adam B, Neil Conway, and Qian Zhang. > > > Bugs: MESOS-4200 > https://issues.apache.org/jira/browse/MESOS-4200 > > > Repository: mesos > > > Description > ------- > > Test case(s) for weights + allocation behavior > > > Diffs > ----- > > src/tests/hierarchical_allocator_tests.cpp > e044f832c2c16e53e663c6ced5452649bb0dcb59 > > Diff: https://reviews.apache.org/r/41672/diff/ > > > Testing > ------- > > Make check done: > Yongs-MacBook-Pro:build yqwyq$ ./src/mesos-tests > --gtest_filter=HierarchicalAllocatorTest.UpdateWeight > Source directory: /Users/yqwyq/Desktop/mesos > Build directory: /Users/yqwyq/Desktop/mesos/build > [==========] Running 1 test from 1 test case. > [----------] Global test environment set-up. > [----------] 1 test from HierarchicalAllocatorTest > [ RUN ] HierarchicalAllocatorTest.UpdateWeight > [ OK ] HierarchicalAllocatorTest.UpdateWeight (87 ms) > [----------] 1 test from HierarchicalAllocatorTest (87 ms total) > > [----------] Global test environment tear-down > [==========] 1 test from 1 test case ran. (176 ms total) > [ PASSED ] 1 test. > > > Thanks, > > Yongqiao Wang > >
