> On April 10, 2015, 7:59 p.m., Zameer Manji wrote:
> > src/test/python/apache/aurora/executor/test_thermos_task_runner.py, line 213
> > <https://reviews.apache.org/r/32889/diff/1/?file=916618#file916618line213>
> >
> >     Patching private methods for testing is a smell and it hinders 
> > refactoring.
> >     
> >     Please instead pass a mock clock to the ThermosTaskRunner constructor 
> > and check if the sleep method was called with ESCALATION_WAIT.

Done. 

The rest of the class requires a working clock. I therefore ended up using a 
wrapper around `time` instead of a pure mock.


- Stephan


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


On April 11, 2015, 11:52 p.m., Stephan Erb wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32889/
> -----------------------------------------------------------
> 
> (Updated April 11, 2015, 11:52 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Zameer Manji.
> 
> 
> Bugs: AURORA-1275
>     https://issues.apache.org/jira/browse/AURORA-1275
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Only perform escalation wait when http teardown signal could be dispatched
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/executor/thermos_task_runner.py 
> 505a1e69ebfe1bd2fa74623063cb923ecff8a021 
>   src/test/python/apache/aurora/executor/BUILD 
> 013f056d2e131ae8077f0fcc542a340195a90e50 
>   src/test/python/apache/aurora/executor/test_thermos_task_runner.py 
> 6b24bbb2ab7ca16f97961aabeed945b61e5b5908 
> 
> Diff: https://reviews.apache.org/r/32889/diff/
> 
> 
> Testing
> -------
> 
> ./pants test.pytest --no-fast --options=-v 
> src/test/python/apache/aurora/executor:thermos_task_runner
> 
> In addition, manual verification that shutdown of health-checked services 
> without lifecycle methods is 10 seconds faster.
> 
> 
> Thanks,
> 
> Stephan Erb
> 
>

Reply via email to