qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Conway" <acon...@redhat.com>
Subject Re: Review Request 16577: QPID-5428: Heartbeats not in use when attempting to connect with python client.
Date Tue, 07 Jan 2014 22:44:41 GMT


> On Jan. 3, 2014, 12:22 a.m., Andrew Stitcher wrote:
> > /trunk/qpid/cpp/src/tests/ha_tests.py, line 243
> > <https://reviews.apache.org/r/16577/diff/1/?file=413695#file413695line243>
> >
> >     I don't see anywhere that you send SIGCONT to the broker to get it to carry
on - how do subsequent tests work?
> 
> Alan Conway wrote:
>     The brokertest framework automatically tears down processes (including brokers) started
by each test, each test starts new brokers as needed.
> 
> Andrew Stitcher wrote:
>     That sounds pretty inefficient - do you really mean that the broker gets torn down
for every test rather than say every test suite?
>     
>     If so that would make these tests much slower than perhaps necessary.

There are 2 kinds of tests:
- simple client/broker interaction tests: you can run a lot of these against a single broker.
- cluster/federation/failover type tests that require multiple brokers to be started and stopped
during the test.

This test is in the latter camp (even thought it doesn't require the HA plugin) because you
need 2 brokers, one sigstopped, the other running normally. Client connects to running broker
then you kill the running broker to cause a fail-over attempt to the stopped broker. You can't
do that with a single, static, externally-started broker that is re-used for multiple tests.

I'm hoping to unite both types of test in a single framework, I think you've seen  https://reviews.apache.org/r/15818/.
Hope to commit something soon.


- Alan


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


On Jan. 6, 2014, 8:46 p.m., Alan Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16577/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2014, 8:46 p.m.)
> 
> 
> Review request for qpid, Gordon Sim and Rafael Schloming.
> 
> 
> Bugs: qpid-5428
>     https://issues.apache.org/jira/browse/qpid-5428
> 
> 
> Repository: qpid
> 
> 
> Description
> -------
> 
> QPID-5428: Heartbeats not in use when attempting to connect with python client.
> 
> Heartbeats ignored when opening a connection, could hang indefinitely
> Need to cover 3 cases (test included):
> - Connect sucessful but then broker stalls.
> - Connect to a stalled broker that never responds.
> - Fail-over to a stalled broker that never responds
> 
> All cases are handled by the following fixes to driver.py:
> - Check for heartbeats even before engine._connected since we may time out
>   before receiving open-ok if the peer is stalled and never sends data.
> - Set _last_in and _last_out so that we time heartbeats from the start of the
>   connection if no data is ever sent or received.
> - Call self.update_status in Driver.timeout to detect connection closed due to
>   heartbeat timeout (rather than a readable or writeable event.)
>   Make update_status a no-op if engine or transport are not yet set up.
> - Don't consider reconnect complete in connect(), wait till we get the open-ok.
>   See the comment on Driver._check_retry_ok()
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/tests/ha_tests.py 1555989 
>   /trunk/qpid/python/qpid/messaging/driver.py 1555989 
> 
> Diff: https://reviews.apache.org/r/16577/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alan Conway
> 
>


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