mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Leng <quinn.leng....@gmail.com>
Subject Re: Review Request 60107: Added filtering to the '/tasks' endpoint.
Date Thu, 29 Jun 2017 00:39:15 GMT


> On June 28, 2017, 11:31 p.m., Greg Mann wrote:
> > src/tests/master_tests.cpp
> > Lines 3545-3547 (patched)
> > <https://reviews.apache.org/r/60107/diff/7/?file=1766587#file1766587line3546>
> >
> >     We want to assert that both of these tasks are there. Should do
> >     
> >     ```
> >         ASSERT_TRUE(value->contains(expected1.get()));
> >         ASSERT_TRUE(value->contains(expected2.get()));
> >     ```

In this case, expected1 and expected2 are not two tasks, they are two possible ordering of
tasks, each of them contains two tasks, you can see that from the content they contain


> On June 28, 2017, 11:31 p.m., Greg Mann wrote:
> > src/tests/master_tests.cpp
> > Lines 3569-3571 (patched)
> > <https://reviews.apache.org/r/60107/diff/7/?file=1766587#file1766587line3570>
> >
> >     You already assert that `taskArray.isSome()` above, so no need for this conditional.
> >     
> >     Also, you can use the `->` operator:
> >     
> >     ```
> >     EXPECT_TRUE(taskArray->values.size() == 1);
> >     ```

taskArray.isSome() is to avoid it's null, but the EXPECT_TRUE check it's size is 1, does that
make sense?


- Quinn


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


On June 29, 2017, 12:39 a.m., Quinn Leng wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60107/
> -----------------------------------------------------------
> 
> (Updated June 29, 2017, 12:39 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod Kone.
> 
> 
> Bugs: MESOS-7630
>     https://issues.apache.org/jira/browse/MESOS-7630
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added filtering to the '/tasks' endpoint.
> 
> 
> Diffs
> -----
> 
>   src/common/http.hpp 93d6088e97c2384f9f6d26e010a501abf2deb43e 
>   src/common/http.cpp 2f7718cbc2e449b4f7c89754e8f84eac2f3c35b6 
>   src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67 
>   src/tests/master_tests.cpp 6cd4be7e5ba48c6562ce91b28e76b065522cfbea 
> 
> 
> Diff: https://reviews.apache.org/r/60107/diff/8/
> 
> 
> Testing
> -------
> 
> Passed "make check"
> Passed "GTEST_FILTER="MasterTest.TasksEndpoint" make check -j48"
> Passed "GLOG_v=1 ./bin/mesos-tests.sh --gtest_filter="MasterTest.TasksEndpoint" --gtest_repeat=1000
--gtest_break_on_failure"
> 
> 
> Thanks,
> 
> Quinn Leng
> 
>


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