Merge lp:~therve/txamqp/close-queues into lp:txamqp

Proposed by Thomas Herve
Status: Merged
Approved by: Esteve Fernandez
Approved revision: 13
Merged at revision: not available
Proposed branch: lp:~therve/txamqp/close-queues
Merge into: lp:txamqp
Diff against target: None lines
To merge this branch: bzr merge lp:~therve/txamqp/close-queues
Reviewer Review Type Date Requested Status
Esteve Fernandez Approve
Review via email: mp+6017@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Esteve Fernandez (esteve) wrote :

Thanks Thomas!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/txamqp/protocol.py'
--- src/txamqp/protocol.py 2009-02-05 19:22:56 +0000
+++ src/txamqp/protocol.py 2009-04-21 10:18:10 +0000
@@ -255,6 +255,8 @@
255 def close(self, reason):255 def close(self, reason):
256 for ch in self.channels.values():256 for ch in self.channels.values():
257 ch.close(reason)257 ch.close(reason)
258 for q in self.queues.values():
259 q.close()
258 self.delegate.close(reason)260 self.delegate.close(reason)
259261
260 def writer(self, frame):262 def writer(self, frame):
261263
=== modified file 'src/txamqp/test/test_queue.py'
--- src/txamqp/test/test_queue.py 2008-10-29 18:31:04 +0000
+++ src/txamqp/test/test_queue.py 2009-04-21 10:18:10 +0000
@@ -257,3 +257,15 @@
257 self.assertChannelException(404, e.args[0])257 self.assertChannelException(404, e.args[0])
258258
259259
260 @inlineCallbacks
261 def test_close_queue(self):
262 from txamqp.queue import Closed as QueueClosed
263 channel = self.channel
264
265 reply = yield channel.queue_declare(queue="test-queue")
266 reply = yield channel.basic_consume(queue="test-queue")
267
268 queue = yield self.client.queue(reply.consumer_tag)
269 d = self.assertFailure(queue.get(timeout=1), QueueClosed)
270 self.client.close(None)
271 yield d

Subscribers

People subscribed via source and target branches

to status/vote changes: