> On June 22, 2016, 12:36 a.m., Vinod Kone wrote:
> > src/tests/api_tests.cpp, lines 1191-1192
> > <https://reviews.apache.org/r/49015/diff/2/?file=1426270#file1426270line1191>
> >
> >     why do you use a MockSlave? since you are not setting any expectations 
> > on the slave, just use CreateSlave() to create an start the slave.

I think @guoger may want to follow the original patch for `/containers` 
endpoint. But I think
```
  Try<Owned<cluster::Slave>> slave = StartSlave(&detector, &containerizer);
  ASSERT_SOME(slave);
```
should be enough instead of use `MockSlave`.


- haosdent


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


On June 21, 2016, 9:55 a.m., Jay Guo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49015/
> -----------------------------------------------------------
> 
> (Updated June 21, 2016, 9:55 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, haosdent huang, and Vinod Kone.
> 
> 
> Bugs: MESOS-5518
>     https://issues.apache.org/jira/browse/MESOS-5518
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented GET_CONTAINERS Call in v1 Agent API.
> 
> 
> Diffs
> -----
> 
>   include/mesos/agent/agent.proto 1792d40140da3687faec4bbf446c97eb8ccab864 
>   include/mesos/v1/agent/agent.proto 7b5988fdb71deba907d76df39052579af4391be4 
>   src/slave/http.cpp b32afb6b776f2fecac850b054ada61aa90ac0052 
>   src/slave/slave.hpp 58ff2bfac6918d989ab36b67cf6ba2f3657c8356 
>   src/tests/api_tests.cpp 55df322f6a843e52d67bb09d3fe763739515602b 
> 
> Diff: https://reviews.apache.org/r/49015/diff/
> 
> 
> Testing
> -------
> 
> The test is flaky and I would appreciate some suggestions.
> 
> If you run individual test `make check 
> GTEST_FILTER="ContentType/AgentAPITest.GetContainers/0"`, it may _pass_ or 
> throw _segfault_ (and sometimes the test passes although teardown fails). 
> However, when running whole testset `make check 
> GTEST_FILTER="*AgentAPITest*"`, it is _very likely_ that GET_CONTAINERS 
> related tests _fail with segfaults_.
> 
> I suspect that `Owned<agent::Response>` being captured is causing problem but 
> I'm running out of ideas at this point.
> 
> 
> Thanks,
> 
> Jay Guo
> 
>

Reply via email to