mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <bbann...@apache.org>
Subject Re: Review Request 70728: Backed `MockResourceProvider` by a process.
Date Thu, 25 Jul 2019 09:10:05 GMT


> On July 18, 2019, 9:48 p.m., Chun-Hung Hsiao wrote:
> > src/tests/mesos.hpp
> > Lines 3361-3372 (patched)
> > <https://reviews.apache.org/r/70728/diff/2/?file=2148571#file2148571line3386>
> >
> >     No need to introduce this type alias in this class template since the class
template `MockResourceProviderProcess` is already public.

We use this to bind the `MockResourceProviderProcess`'s template arguments in a single place
instead of us having to spell out the full instantiations again and again, e.g., when passed
to `dispatch` or elsewhere.

Dropping.


- Benjamin


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


On May 27, 2019, 6:32 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70728/
> -----------------------------------------------------------
> 
> (Updated May 27, 2019, 6:32 p.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao and Jan Schlicht.
> 
> 
> Bugs: MESOS-9560
>     https://issues.apache.org/jira/browse/MESOS-9560
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> We were passing callbacks into `MockResourceProvider` to the HTTP
> driver. Since the lifecycle of the callbacks and the mock provider were
> decoupled and these callbacks were binding the mock provider instance
> the code was not safe as written as the driver could invoke the callback
> after the provider had been destructed.
> 
> This patch makes sure that the callbacks are defered to a process. We
> also dispatch a number of other functions which are strongly coupled to
> the lifecycle of the provider. We still do not hide the provider away
> completely so the provider can be mocked in tests.
> 
> 
> Diffs
> -----
> 
>   src/tests/api_tests.cpp 641eb15153ddb85df322aa6a133ca8e4c6d6a510 
>   src/tests/master_slave_reconciliation_tests.cpp 7b6ac50adacc8416b91c0dde55ff7ba46a20515c

>   src/tests/master_tests.cpp b9ef13c31a9c3ae16e55d3ae8f9b1538a49cf49a 
>   src/tests/mesos.hpp 4612e2e3d2bd32590248df58b546de8756636964 
>   src/tests/operation_reconciliation_tests.cpp eae318da2273faae904f0155e49bb23cdb24f007

>   src/tests/resource_provider_manager_tests.cpp 7d48f18e89f046df6c92e52edeef592acfb13b10

>   src/tests/slave_tests.cpp abee107720d6b78bb017d2762431ae36c0679026 
> 
> 
> Diff: https://reviews.apache.org/r/70728/diff/3/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


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