> On Feb. 2, 2017, 4:19 p.m., Dmitro Lisnichenko wrote:
> > ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py, 
> > line 324
> > <https://reviews.apache.org/r/56225/diff/2/?file=1622218#file1622218line324>
> >
> >     I think this assertion makes no sence since we would not get here in 
> > case of any (unhandled) exception
> 
> Attila Doroszlai wrote:
>     The point is that the exception is handled (see `except KeyError` in 
> original `CustomServiceOrchestrator`), but the traceback remains "active" 
> (ie. `format_exc()` returns it) later in the same thread.
>     
>     However, you are right that this assertion does not test what I intended: 
> the tested code and the assertion do not run in the same thread, so the 
> exception info is not shared.  I'm still trying to figure out why.  Any ideas?

my guess would be that it only works within the except statement (probably that 
is a context management related thing)


- Dmitro


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


On Feb. 2, 2017, 3:36 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56225/
> -----------------------------------------------------------
> 
> (Updated Feb. 2, 2017, 3:36 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Dmitro Lisnichenko, Sandor 
> Magyari, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-19846
>     https://issues.apache.org/jira/browse/AMBARI-19846
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Avoid recording the traceback for this `KeyError`, which is expected for 
> status commands.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
> 9baaf08d6cd1fe38db19a34907d44514bded228d 
>   ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py 
> 3985c5a21ebcaa5c526b772e8ad13d1bf0427d99 
> 
> Diff: https://reviews.apache.org/r/56225/diff/
> 
> 
> Testing
> -------
> 
> Manually tested on local cluster.
> 
> Unit tests:
> 
> ```
> $ mvn -pl ambari-agent clean test
> ...
> Ran 455 tests in 15.152s
> 
> OK
> ...
> [INFO] BUILD SUCCESS
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>

Reply via email to