> On March 28, 2019, 9:57 a.m., Benjamin Bannier wrote:
> > src/tests/storage_local_resource_provider_tests.cpp
> > Lines 1550 (patched)
> > <https://reviews.apache.org/r/70331/diff/1/?file=2135852#file2135852line1569>
> >
> >     Let's check the range is not empty before dereferencing the iterator.
> 
> Chun-Hung Hsiao wrote:
>     The checks at L1546 combined with L1549 should have guaranteed this. Do 
> you think it is really necessary to introduce a temporary variable for an 
> additional assertion?

I do believe that would be clearer, yes.


> On March 28, 2019, 9:57 a.m., Benjamin Bannier wrote:
> > src/tests/storage_local_resource_provider_tests.cpp
> > Lines 1555-1561 (patched)
> > <https://reviews.apache.org/r/70331/diff/1/?file=2135852#file2135852line1574>
> >
> >     Should we make this a single predicate, e.g.,
> >     ```
> >     OffersHaveAnyResource([](const Resource& r) {
> >       Bytes size = Megabytes(r.scalar().value());
> >       return isMountDisk(r, "good") &&
> >         (size == Gigabytes(2) || size == Gigabytes(3));
> >     }
> >     ```
> 
> Chun-Hung Hsiao wrote:
>     No. These are inside `AllOf` to specifically match *2* resources.

I missed that ;) Could you point that out in the comment above?


- Benjamin


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


On March 28, 2019, 6:18 a.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70331/
> -----------------------------------------------------------
> 
> (Updated March 28, 2019, 6:18 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Jie Yu, and Jan Schlicht.
> 
> 
> Bugs: MESOS-9655
>     https://issues.apache.org/jira/browse/MESOS-9655
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch makes the `AgentRegisteredWithNewId` SLRP test to test the
> following scenarios:
> 
>   * Launch a task to access a volume imported through `CREATE_DISK`.
> 
>   * `CREATE_DISK` with a mismatched profile.
> 
>   * `DESTROY_DISK` with a `RAW` disk that has been published.
> 
> Together with the `CreateDestroyPreprovisionedVolume` SLRP test, most
> scenarios of preprovisioned volumes are now covered.
> 
> 
> Diffs
> -----
> 
>   src/tests/storage_local_resource_provider_tests.cpp 
> 797f89e3545965e2cf2fd5ec0ecd78fc77a4ea87 
> 
> 
> Diff: https://reviews.apache.org/r/70331/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> Run in repetition.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>

Reply via email to