mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niklas Nielsen" <...@qni.dk>
Subject Re: Review Request 34816: Changed TestResourceEstimator to be mocked.
Date Fri, 29 May 2015 22:46:37 GMT


> On May 29, 2015, 1:28 p.m., Niklas Nielsen wrote:
> > src/tests/mesos.hpp, line 704
> > <https://reviews.apache.org/r/34816/diff/2/?file=974402#file974402line704>
> >
> >     Why are we specializing it for the NoopResourceEstimator here?
> 
> Bartek Plotka wrote:
>     To have default value for that typename (:
>     
>     It has no use in fact - i just was inspired by TestAllocator. I can make it just
template <typename T>

Ah - thanks for clarifying.


> On May 29, 2015, 1:28 p.m., Niklas Nielsen wrote:
> > src/tests/mesos.hpp, line 710
> > <https://reviews.apache.org/r/34816/diff/2/?file=974402#file974402line710>
> >
> >     Couldn't we drop 'Option<std::string>()' or replace with None()?
> 
> Bartek Plotka wrote:
>     ResourceEstimator was defined to have create(Option<string> parameter. It's
fine because it enables to make a RE factory.
>     
>     But for typed tested - Either:
>     1. We'll drop this Option here and add create() interface for NoopRE 
>     or 
>     2. We'll just put None() and make create(Option<std::string> type) interface
in tests/modules.cpp.
>     
>     I'd prefer the second option (:

Having a default value for ResourceEstimator::create() would do also, right?

I am fine with (2)


- Niklas


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


On May 29, 2015, 11:18 a.m., Bartek Plotka wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34816/
> -----------------------------------------------------------
> 
> (Updated May 29, 2015, 11:18 a.m.)
> 
> 
> Review request for mesos, Jie Yu, Niklas Nielsen, Szymon Konefal, and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch prepares Resource Estimator tests for modularized ResourceEstimator.
> 
> It includes:
> 1. Made oversubscription_test to be typed_test.
> 2. TestResourceEstimator changed to be a templated MockResourceEstimator with mocked
methods - to inject resources and test plumbing between RE and Slave.
> 
> 
> Diffs
> -----
> 
>   src/tests/mesos.hpp b8f7a2f9236166e42421d926718af8d45e857eba 
>   src/tests/oversubscription_tests.cpp 75c25b04c1e6a8e0e7e8fd55440743fe1699af88 
> 
> Diff: https://reviews.apache.org/r/34816/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Bartek Plotka
> 
>


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