mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 61272: Added a MockResourceProvider.
Date Tue, 01 Aug 2017 22:37:15 GMT

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




src/tests/mesos.hpp
Lines 2287-2291 (patched)
<https://reviews.apache.org/r/61272/#comment257734>

    This is a bit counter intuitive. I was expecting that MockResourceProvider will take a
real Driver:
    ```
    class MockResourceProvider
    {
    public:
      MockResourceProvider(
          const URL& endpoint,
          ContentType contentType)
        : driver(
              Owned<EndpointDetector>(new ConstantEndpointDetector(endpoint)),
              contentType,
              [this]() { connected(); },
              [this]() { disconnected(); },
              [this](std::queue<Event> events) {
                while (!events.empty()) {
                  Event event = std::move(events.front());
                  events.pop();
                  received(event);
                }
              }) {}
              
      MOCK_METHOD0_T(connected, void());
      MOCK_METHOD0_T(disconnected, void());
      ...
    
    private:
      Driver driver;
    };
    ```


- Jie Yu


On Aug. 1, 2017, 2:06 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61272/
> -----------------------------------------------------------
> 
> (Updated Aug. 1, 2017, 2:06 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/tests/mesos.hpp 6f06261d81870b923b7053daf8205327c4ac6a45 
> 
> 
> Diff: https://reviews.apache.org/r/61272/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


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