aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sweeney" <kevi...@apache.org>
Subject Re: Review Request 28451: Modify TRequestsTransport to raise an exception 4xx or 5xx responses.
Date Tue, 25 Nov 2014 21:27:22 GMT

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



src/test/python/apache/aurora/common/test_transport.py
<https://reviews.apache.org/r/28451/#comment105224>

    You can remove the lambda here if you unset instance=True on session.



src/test/python/apache/aurora/common/test_transport.py
<https://reviews.apache.org/r/28451/#comment105223>

    You can use [pytest.raises](http://pytest.org/latest/builtin.html#pytest.raises) here.



src/test/python/apache/aurora/common/test_transport.py
<https://reviews.apache.org/r/28451/#comment105222>

    You can do response.raise_for_status.assert_called_once_with() here.


- Kevin Sweeney


On Nov. 25, 2014, 1:22 p.m., Zameer Manji wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28451/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 1:22 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Bugs: AURORA-949
>     https://issues.apache.org/jira/browse/AURORA-949
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This changes TRequestsTransport to raise an exception on 4xx or 5xx responses. Previously
the TRequestsTransport would ignore those responses and treat the response as valid. The response
would not be valid JSON and cause thrift decoding errors later on.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/common/transport.py 6f7c355d725b5e537cc4ae471170eaa8431da326

>   src/test/python/apache/aurora/common/test_transport.py c722eae2d04dec90e9c772f49c578184a2bdf76c

> 
> Diff: https://reviews.apache.org/r/28451/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python/apache/aurora/common:test_transport -v
> 
> 
> Thanks,
> 
> Zameer Manji
> 
>


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