mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Mathiske" <be...@mesosphere.io>
Subject Re: Review Request 35438: Fixed fetcher cache test race for resource offers when starting tasks and changed corresponding CHECK to EXPECT.
Date Mon, 15 Jun 2015 08:49:49 GMT


> On June 14, 2015, 11:45 p.m., Timothy Chen wrote:
> > src/tests/fetcher_cache_tests.cpp, line 358
> > <https://reviews.apache.org/r/35438/diff/1/?file=984513#file984513line358>
> >
> >     Does this mean when the default changes we need to change this value too?
> >     
> >     Also what's the rationale making it a Error/Try? Is this because a timeout can
be a valid case here?

Since the default is a naked number in AWAIT_..., we would have to change library code, first,
to improve this. I'll insert a TODO.

Many such test support macros are geared towards inlining all code into every test. Having
local returns of type void, they don't work inside functions that do not return void - and
they are incapable of ending the whole test from within nested calls.

So, in consequence, the strategy to uplevel errors into call level zero and use an EXPECT_...
macro there seems right.

Another alternative is avoiding procedural abstraction, which is common in our (test) code
base.


- Bernd


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


On June 14, 2015, 6:54 a.m., Bernd Mathiske wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35438/
> -----------------------------------------------------------
> 
> (Updated June 14, 2015, 6:54 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Timothy Chen, and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Follow up to RR https://reviews.apache.org/r/35247/, which was not good enough, fixed
only one of two problems.
> 
> Using DeclineOffers() instead of Return() should make the master resend offers so we
can launch tasks. See line 205 below.
> 
> Following Jie's suggestion, no more CHECK_READY inside launchTask(s)(), but we return
a Try instead and follow call sites with EXPECT_SOME(task(s)).
> 
> 
> Diffs
> -----
> 
>   src/tests/fetcher_cache_tests.cpp 8bd5dd847fb189d0eeeaa760d3ec8ce3af1c2392 
> 
> Diff: https://reviews.apache.org/r/35438/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Bernd Mathiske
> 
>


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