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/02/27 01:30:41 UTC

Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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

Review request for mesos and Benjamin Mahler.


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


Repository: mesos


Description
-------

Added tests for `+=` and `-=` operators.


Diffs
-----

  src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 


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


Testing
-------

make check


Thanks,

Meng Zhu


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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



Patch looks great!

Reviews applied: [70061, 70062, 70069, 70063]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Feb. 27, 2019, 1:30 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2019, 1:30 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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



Patch looks great!

Reviews applied: [70061, 70062, 70063]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Feb. 27, 2019, 1:30 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2019, 1:30 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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



Patch looks great!

Reviews applied: [70061, 70062, 70063]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Feb. 26, 2019, 5:30 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2019, 5:30 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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



PASS: Mesos patch 70063 was successfully built and tested.

Reviews applied: `['70061', '70148', '70062', '70069', '70063']`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2966/mesos-review-70063

- Mesos Reviewbot Windows


On Feb. 26, 2019, 5:30 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2019, 5:30 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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


Ship it!




Ship It!

- Benjamin Mahler


On Feb. 27, 2019, 1:30 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2019, 1:30 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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

> On Feb. 27, 2019, 8:34 a.m., Benjamin Mahler wrote:
> > src/tests/resource_quantities_tests.cpp
> > Lines 207-220 (patched)
> > <https://reviews.apache.org/r/70063/diff/1/?file=2127056#file2127056line207>
> >
> >     It feels like we could make the test quite succinct with some test lambdas?
> >     
> >     ```
> >     quantities = from("apus:1;cpus:10.1") - from("cpus:1;mem:100");
> >     
> >     EXPECT_EQ({{"apus", 1}, {"cpus", 1}, {"mem", 1}}, asVector(quantities));
> >     ```

Thanks. Introduced a helper and refactored existing tests in https://reviews.apache.org/r/70069/.


> On Feb. 27, 2019, 8:34 a.m., Benjamin Mahler wrote:
> > src/tests/resource_quantities_tests.cpp
> > Lines 235 (patched)
> > <https://reviews.apache.org/r/70063/diff/1/?file=2127056#file2127056line235>
> >
> >     We should probably assert all sizes in these tests since the subsequent lines can crash if the size is violated.

No longer need to the size after introducing the helper. Dropping.


- Meng


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


On Feb. 26, 2019, 5:30 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2019, 5:30 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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




src/tests/resource_quantities_tests.cpp
Lines 207-220 (patched)
<https://reviews.apache.org/r/70063/#comment299184>

    It feels like we could make the test quite succinct with some test lambdas?
    
    ```
    quantities = from("apus:1;cpus:10.1") - from("cpus:1;mem:100");
    
    EXPECT_EQ({{"apus", 1}, {"cpus", 1}, {"mem", 1}}, asVector(quantities));
    ```



src/tests/resource_quantities_tests.cpp
Lines 235 (patched)
<https://reviews.apache.org/r/70063/#comment299183>

    We should probably assert all sizes in these tests since the subsequent lines can crash if the size is violated.


- Benjamin Mahler


On Feb. 27, 2019, 1:30 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2019, 1:30 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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




src/tests/resource_quantities_tests.cpp
Lines 169 (patched)
<https://reviews.apache.org/r/70063/#comment299580>

    apus kind of looks like a typo at first glance, maybe just use a different name like mem or disk or gpus?



src/tests/resource_quantities_tests.cpp
Lines 232 (patched)
<https://reviews.apache.org/r/70063/#comment299582>

    ditto here with apus



src/tests/resource_quantities_tests.cpp
Lines 238 (patched)
<https://reviews.apache.org/r/70063/#comment299581>

    ditto here w.r.t. apus


- Benjamin Mahler


On Feb. 27, 2019, 1:30 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2019, 1:30 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


Re: Review Request 70063: Added test for `ResourceQuantities` arithmetic operations.

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



Patch looks great!

Reviews applied: [70061, 70062, 70069, 70063]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On Feb. 26, 2019, 5:30 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70063/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2019, 5:30 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-9608
>     https://issues.apache.org/jira/browse/MESOS-9608
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added tests for `+=` and `-=` operators.
> 
> 
> Diffs
> -----
> 
>   src/tests/resource_quantities_tests.cpp 435a4949b95e9a83be73781388eb4be9c7da695b 
> 
> 
> Diff: https://reviews.apache.org/r/70063/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>