You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Meng Zhu <mz...@mesosphere.io> on 2019/04/08 03:04:12 UTC

Review Request 70418: Added a test to verify the sort correctness of the random sorter.

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

Review request for mesos and Benjamin Mahler.


Repository: mesos


Description
-------

Added a test to verify the sort correctness of the random sorter.


Diffs
-----

  src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 


Diff: https://reviews.apache.org/r/70418/diff/1/


Testing
-------

make check


Thanks,

Meng Zhu


Re: Review Request 70418: Added a test to verify the sort correctness of the random sorter.

Posted by Meng Zhu <mz...@mesosphere.io>.

> On April 8, 2019, 12:32 p.m., Benjamin Mahler wrote:
> > Do we want to test the hierarchical weighting as well in this test? Or separately? Gave a ship it assuming a separate test.

Yep, we need separate tests for hierarchical weighting. And also for cases where (some) leaves are deactived as well.


> On April 8, 2019, 12:32 p.m., Benjamin Mahler wrote:
> > src/tests/sorter_tests.cpp
> > Lines 99 (patched)
> > <https://reviews.apache.org/r/70418/diff/1/?file=2137899#file2137899line99>
> >
> >     It doesn't look like the SET UP and TEST comments are helpful in this test to me, rather it seems more helpful to have a small paragraph at the top, much like the test that this copies?
> >     
> >     ```
> >     // Test the behavior of the random sorter by ensuring that the
> >     // probability distribution after a number of runs is within
> >     // a particular error bound.
> >     ```

Sounds good. Thanks.


> On April 8, 2019, 12:32 p.m., Benjamin Mahler wrote:
> > src/tests/sorter_tests.cpp
> > Lines 120 (patched)
> > <https://reviews.apache.org/r/70418/diff/1/?file=2137899#file2137899line120>
> >
> >     Where is toVector declared and why do you need to call it here when sort return std::vector already?

Ooops, I should not change the commit order. This was added in r/70419. Fixed the dependency.


- Meng


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


On April 7, 2019, 8:04 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70418/
> -----------------------------------------------------------
> 
> (Updated April 7, 2019, 8:04 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test to verify the sort correctness of the random sorter.
> 
> 
> Diffs
> -----
> 
>   src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 
> 
> 
> Diff: https://reviews.apache.org/r/70418/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70418: Added a test to verify the sort correctness of the random sorter.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70418/#review214473
-----------------------------------------------------------


Fix it, then Ship it!




Do we want to test the hierarchical weighting as well in this test? Or separately? Gave a ship it assuming a separate test.


src/tests/sorter_tests.cpp
Lines 99 (patched)
<https://reviews.apache.org/r/70418/#comment300678>

    It doesn't look like the SET UP and TEST comments are helpful in this test to me, rather it seems more helpful to have a small paragraph at the top, much like the test that this copies?
    
    ```
    // Test the behavior of the random sorter by ensuring that the
    // probability distribution after a number of runs is within
    // a particular error bound.
    ```



src/tests/sorter_tests.cpp
Lines 120 (patched)
<https://reviews.apache.org/r/70418/#comment300677>

    Where is toVector declared and why do you need to call it here when sort return std::vector already?


- Benjamin Mahler


On April 8, 2019, 3:04 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70418/
> -----------------------------------------------------------
> 
> (Updated April 8, 2019, 3:04 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test to verify the sort correctness of the random sorter.
> 
> 
> Diffs
> -----
> 
>   src/tests/sorter_tests.cpp 9d52a80eafb6f955386a6575875daacf5d4b4e9e 
> 
> 
> Diff: https://reviews.apache.org/r/70418/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>