You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joerg Schad <jo...@mesosphere.io> on 2015/12/21 15:49:34 UTC

Re: Review Request 39614: Quota: Added Status Validation Tests.

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

(Updated Dec. 21, 2015, 2:49 p.m.)


Review request for mesos, Alexander Rukletsov and Bernd Mathiske.


Changes
-------

rebased


Bugs: MESOS-3073
    https://issues.apache.org/jira/browse/MESOS-3073


Repository: mesos


Description
-------

Quota: Added Status Validation Tests.


Diffs (updated)
-----

  src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 

Diff: https://reviews.apache.org/r/39614/diff/


Testing
-------

make check


Thanks,

Joerg Schad


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39614/#review111508
-----------------------------------------------------------


Looks good. Some high-level comments:
- You use `const` inconsistently. We have different opinions in the community about marking local variables `const`, I personally would like to see them more often. However, let's stay consistent throughout the test/function/class.
- I think we can easily merge two tests into one: query quota status; add an agent, set quota and query again; remove quota and query one more time. You can use scopes to separate these stages from one another like you did in `SetInvalidResourceInfos`. You can go even further and add status checks to existing tests, but I would prefer to have a separate test for status endpoint. I leave this decision to you and your shepherd.


src/tests/master_quota_tests.cpp (lines 492 - 493)
<https://reviews.apache.org/r/39614/#comment171710>

    s/no quota set/no quotas set
    s/"against /quota."/"."



src/tests/master_quota_tests.cpp (line 517)
<https://reviews.apache.org/r/39614/#comment171805>

    Why `parse` is marked `const` and `array` isn't?



src/tests/master_quota_tests.cpp (line 540)
<https://reviews.apache.org/r/39614/#comment171806>

    Since there is just one agent, no need to enumerate it.


- Alexander Rukletsov


On Dec. 21, 2015, 5:16 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39614/
> -----------------------------------------------------------
> 
> (Updated Dec. 21, 2015, 5:16 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Bernd Mathiske.
> 
> 
> Bugs: MESOS-4218
>     https://issues.apache.org/jira/browse/MESOS-4218
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Quota: Added Status Validation Tests.
> 
> 
> Diffs
> -----
> 
>   src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 
> 
> Diff: https://reviews.apache.org/r/39614/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39614/#review111612
-----------------------------------------------------------


Patch looks great!

Reviews applied: [39492, 39614]

Passed command: export OS=ubuntu:14.04;export CONFIGURATION="--verbose";export COMPILER=gcc; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 22, 2015, 12:18 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39614/
> -----------------------------------------------------------
> 
> (Updated Dec. 22, 2015, 12:18 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Bernd Mathiske.
> 
> 
> Bugs: MESOS-4218
>     https://issues.apache.org/jira/browse/MESOS-4218
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Quota: Added Status Validation Tests.
> 
> 
> Diffs
> -----
> 
>   src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 
> 
> Diff: https://reviews.apache.org/r/39614/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Joerg Schad <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39614/
-----------------------------------------------------------

(Updated Dec. 22, 2015, 12:18 p.m.)


Review request for mesos, Alexander Rukletsov and Bernd Mathiske.


Bugs: MESOS-4218
    https://issues.apache.org/jira/browse/MESOS-4218


Repository: mesos


Description
-------

Quota: Added Status Validation Tests.


Diffs (updated)
-----

  src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 

Diff: https://reviews.apache.org/r/39614/diff/


Testing
-------

make check


Thanks,

Joerg Schad


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Joerg Schad <jo...@mesosphere.io>.

> On Dec. 22, 2015, 10:43 a.m., Alexander Rukletsov wrote:
> > src/tests/master_quota_tests.cpp, line 578
> > <https://reviews.apache.org/r/39614/diff/7/?file=1174450#file1174450line578>
> >
> >     The ReviewBot is failing because `quotaResources` must be flattened.
> >     
> >     Also, why do you use `ASSERT_*` instead of `EXPECT_*` which are used throughout the test?

I use ASSERT_* if the following part of the test relies (hard) on the outcome, e.g. checking array sizes or calling get() on a Try.


- Joerg


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


On Dec. 22, 2015, 10:19 a.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39614/
> -----------------------------------------------------------
> 
> (Updated Dec. 22, 2015, 10:19 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Bernd Mathiske.
> 
> 
> Bugs: MESOS-4218
>     https://issues.apache.org/jira/browse/MESOS-4218
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Quota: Added Status Validation Tests.
> 
> 
> Diffs
> -----
> 
>   src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 
> 
> Diff: https://reviews.apache.org/r/39614/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Alexander Rukletsov <ru...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39614/#review111597
-----------------------------------------------------------



src/tests/master_quota_tests.cpp (line 578)
<https://reviews.apache.org/r/39614/#comment171815>

    The ReviewBot is failing because `quotaResources` must be flattened.
    
    Also, why do you use `ASSERT_*` instead of `EXPECT_*` which are used throughout the test?


- Alexander Rukletsov


On Dec. 22, 2015, 10:19 a.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39614/
> -----------------------------------------------------------
> 
> (Updated Dec. 22, 2015, 10:19 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Bernd Mathiske.
> 
> 
> Bugs: MESOS-4218
>     https://issues.apache.org/jira/browse/MESOS-4218
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Quota: Added Status Validation Tests.
> 
> 
> Diffs
> -----
> 
>   src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 
> 
> Diff: https://reviews.apache.org/r/39614/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Joerg Schad <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39614/
-----------------------------------------------------------

(Updated Dec. 22, 2015, 10:19 a.m.)


Review request for mesos, Alexander Rukletsov and Bernd Mathiske.


Changes
-------

Adressed comments


Bugs: MESOS-4218
    https://issues.apache.org/jira/browse/MESOS-4218


Repository: mesos


Description
-------

Quota: Added Status Validation Tests.


Diffs (updated)
-----

  src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 

Diff: https://reviews.apache.org/r/39614/diff/


Testing
-------

make check


Thanks,

Joerg Schad


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Joerg Schad <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39614/
-----------------------------------------------------------

(Updated Dec. 22, 2015, 9:40 a.m.)


Review request for mesos, Alexander Rukletsov and Bernd Mathiske.


Bugs: MESOS-4218
    https://issues.apache.org/jira/browse/MESOS-4218


Repository: mesos


Description
-------

Quota: Added Status Validation Tests.


Diffs
-----

  src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 

Diff: https://reviews.apache.org/r/39614/diff/


Testing
-------

make check


Thanks,

Joerg Schad


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Joerg Schad <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39614/
-----------------------------------------------------------

(Updated Dec. 21, 2015, 5:16 p.m.)


Review request for mesos, Alexander Rukletsov and Bernd Mathiske.


Bugs: MESOS-4218
    https://issues.apache.org/jira/browse/MESOS-4218


Repository: mesos


Description
-------

Quota: Added Status Validation Tests.


Diffs
-----

  src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 

Diff: https://reviews.apache.org/r/39614/diff/


Testing
-------

make check


Thanks,

Joerg Schad


Re: Review Request 39614: Quota: Added Status Validation Tests.

Posted by Joerg Schad <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39614/
-----------------------------------------------------------

(Updated Dec. 21, 2015, 5:13 p.m.)


Review request for mesos, Alexander Rukletsov and Bernd Mathiske.


Bugs: MESOS-3073
    https://issues.apache.org/jira/browse/MESOS-3073


Repository: mesos


Description
-------

Quota: Added Status Validation Tests.


Diffs
-----

  src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 

Diff: https://reviews.apache.org/r/39614/diff/


Testing
-------

make check


Thanks,

Joerg Schad