> On Jan. 22, 2015, 11:19 a.m., Timothy Chen wrote:
> > src/tests/mesos.cpp, line 614
> > <https://reviews.apache.org/r/30173/diff/1/?file=829921#file829921line614>
> >
> >     If you call pop with an empty task status queue, you actually remove 
> > the temporaroy holder in your constructor.
> >     
> >     And then if push is called then the .back()->set will throw.
> >     
> >     I think you need to guard your pop with a size.

I am intentionally not guarding the pop so I get an error if it fails. It is 
supposed to never failed if used correctly in my code, which is marked private. 
Would you rather like a CHECK of some sort?


> On Jan. 22, 2015, 11:19 a.m., Timothy Chen wrote:
> > src/tests/mesos.cpp, line 628
> > <https://reviews.apache.org/r/30173/diff/1/?file=829921#file829921line628>
> >
> >     I think if all you want to do is await there is a finished state, why 
> > not just one promise and wait on that single promise in that await.
> >     While you're push then just satisfy the promise if it's TASK_FINISHED?

Not sure what you mean. Please provide code and I will use it :-)

The problem is that I may get SEVERAL potentially unsatisfied futures from 
EXPECT_CALL and I have no way of telling if any of them is going to be 
TASK_FINISHED until is satisfied. So my strategy is to buffer them and wait for 
each of them, one after another, until I meet the one that is TASK_FINISHED. 
And that's a queue.


- Bernd


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


On Jan. 22, 2015, 8:57 a.m., Bernd Mathiske wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30173/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2015, 8:57 a.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Hindman, Till Toenshoff, and 
> Timothy Chen.
> 
> 
> Bugs: MESOS-2074
>     https://issues.apache.org/jira/browse/MESOS-2074
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Adds a new test source file containing a test fixture and tests to find out 
> if the fetcher cache works with a variety of settings.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 07bea1fb8f0035413f2119859e16fa4f9383f68e 
>   src/tests/fetcher_cache_tests.cpp 13cf5550d5f380e0b9562d443d28234b5a4bf286 
>   src/tests/mesos.hpp 591134bab31da0a1cc224e332666d05f320d0f87 
>   src/tests/mesos.cpp 5ed4df530cf1bf11eec3b29542641822e0f702b2 
> 
> Diff: https://reviews.apache.org/r/30173/diff/
> 
> 
> Testing
> -------
> 
> Does not work yet. This is a preview so formatting and the general approach 
> can be looked at ASAP. I am currently debugging the fetcher cache using these 
> tests.
> 
> 
> Thanks,
> 
> Bernd Mathiske
> 
>

Reply via email to