-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44511/#review125225
-----------------------------------------------------------


Fix it, then Ship it!




Looks great! I'd move the weightInfo setup right before it's used, but that's 
trivial enough I can do it before committing.


src/tests/registrar_tests.cpp (lines 912 - 915)
<https://reviews.apache.org/r/44511/#comment188011>

    I would move this below the "prepare the registrar" step, just before the 
`registrar.apply()`



src/tests/registrar_tests.cpp (lines 929 - 933)
<https://reviews.apache.org/r/44511/#comment188012>

    Ditto. Don't confuse me with new weights when you're about to check that 
the old weights are still there after recovery.


- Adam B


On March 22, 2016, 12:22 a.m., Yongqiao Wang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44511/
> -----------------------------------------------------------
> 
> (Updated March 22, 2016, 12:22 a.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-4797
>     https://issues.apache.org/jira/browse/MESOS-4797
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add registry tests for /weights endpoint.
> 
> 
> Diffs
> -----
> 
>   src/tests/dynamic_weights_tests.cpp 
> ee0c4b1cc20e76a35a8e4e445f6827a1fc33e6c6 
>   src/tests/registrar_tests.cpp c330af2a190282e159d9ab477cdc36a7881842cd 
> 
> Diff: https://reviews.apache.org/r/44511/diff/
> 
> 
> Testing
> -------
> 
> Add three sub tests for /weights endpoint registry in this patch:
> 
> 1. Tests whether the weights replicated log is initialized with the 
> `--weights` flag when bootstrapping the cluster.
> 2. Tests whether the weights replicated log can be updated with `/weights` 
> endpoint.
> 3. Tests whether the `--weights` flag is ignored and use the registry value 
> instead when Mesos master subsequently starts with `--weights` flag still 
> specified.
> 
> ./src/mesos-tests --gtest_filter=Strict/RegistrarTest.UpdateWeights/*
> [==========] Running 2 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 2 tests from Strict/RegistrarTest
> [ RUN      ] Strict/RegistrarTest.UpdateWeights/0
> [       OK ] Strict/RegistrarTest.UpdateWeights/0 (103 ms)
> [ RUN      ] Strict/RegistrarTest.UpdateWeights/1
> [       OK ] Strict/RegistrarTest.UpdateWeights/1 (67 ms)
> [----------] 2 tests from Strict/RegistrarTest (171 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 2 tests from 1 test case ran. (178 ms total)
> [  PASSED  ] 2 tests.
> 
> 
> make && make check.
> 
> 
> Thanks,
> 
> Yongqiao Wang
> 
>

Reply via email to