mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chun-Hung Hsiao <chhs...@apache.org>
Subject Re: Review Request 69359: Rewrote test `ReconcileDroppedOperation` for `CREATE_DISK`.
Date Mon, 19 Nov 2018 19:09:29 GMT


> On Nov. 16, 2018, 12:02 p.m., Benjamin Bannier wrote:
> > src/tests/storage_local_resource_provider_tests.cpp
> > Line 3899 (original), 3895 (patched)
> > <https://reviews.apache.org/r/69359/diff/1/?file=2108406#file2108406line3906>
> >
> >     Before dereferencing `begin` we should `ASSERT_FALSE(raw.empty())`.

`ASSERT_SOME_EQ(Gigabytes(4), raw.disk())` alrealy guarantees that `raw` is not empty. But
let me do a `ASSERT_EQ(1u, offersBeforeOperations->size())` to make sure that the offer
contains raw disk resources.


> On Nov. 16, 2018, 12:02 p.m., Benjamin Bannier wrote:
> > src/tests/storage_local_resource_provider_tests.cpp
> > Lines 3899 (patched)
> > <https://reviews.apache.org/r/69359/diff/1/?file=2108406#file2108406line3910>
> >
> >     Let's check before dereferencing `begin()` that `raw - source1` is not empty.

`ASSERT_SOME_EQ(Gigabytes(4), raw.disk())` would have guaranteed this. I prefer dropping this
to keep the test succinct, unless you strongly prefer adding the extra check.


- Chun-Hung


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


On Nov. 16, 2018, midnight, Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69359/
> -----------------------------------------------------------
> 
> (Updated Nov. 16, 2018, midnight)
> 
> 
> Review request for mesos, Benjamin Bannier, Gastón Kleiman, and Greg Mann.
> 
> 
> Bugs: MESOS-9275
>     https://issues.apache.org/jira/browse/MESOS-9275
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously the `ReconcileDroppedOperation` test relies on converting
> preprovisioned volumes. To adapt the new semantics for `CREATE_DISK`,
> this test is rewritten to create two disks from a storage pool, with one
> operation dropped.
> 
> 
> Diffs
> -----
> 
>   src/tests/storage_local_resource_provider_tests.cpp 077a46585bd56181ba199dc529e09f38f4971338

> 
> 
> Diff: https://reviews.apache.org/r/69359/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message