summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-12-02 18:35:41 +0000
committerGordon Sim <gsim@apache.org>2008-12-02 18:35:41 +0000
commit0fa4afae5e690b1cf147ebbe60641b448fcb5c31 (patch)
tree6ec78b3451d1205c947e63bfb39c014b5e033959 /python
parentbb9025d388d7c1a0f6b4f471e05e51bfb191ea56 (diff)
downloadqpid-python-0fa4afae5e690b1cf147ebbe60641b448fcb5c31.tar.gz
QPID-1419: remove wip support from 0-9 python client
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@722557 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r--python/qpid/connection08.py6
-rw-r--r--python/qpid/peer.py6
-rw-r--r--python/qpid/testlib.py18
3 files changed, 17 insertions, 13 deletions
diff --git a/python/qpid/connection08.py b/python/qpid/connection08.py
index 8f2eef4770..be94a792cb 100644
--- a/python/qpid/connection08.py
+++ b/python/qpid/connection08.py
@@ -122,6 +122,12 @@ class Connection:
raise "frame error: expected %r, got %r" % (self.FRAME_END, garbage)
return frame
+ def write_0_9(self, frame):
+ self.write_8_0(frame)
+
+ def read_0_9(self):
+ return self.read_8_0()
+
def write_0_10(self, frame):
c = self.codec
flags = 0
diff --git a/python/qpid/peer.py b/python/qpid/peer.py
index 0932efeab3..648f32ceef 100644
--- a/python/qpid/peer.py
+++ b/python/qpid/peer.py
@@ -193,11 +193,7 @@ class Channel:
self.futures = {}
self.control_queue = Queue(0)#used for incoming methods that appas may want to handle themselves
- # Use reliable framing if version == 0-9.
- if spec.major == 0 and spec.minor == 9:
- self.invoker = self.invoke_reliable
- else:
- self.invoker = self.invoke_method
+ self.invoker = self.invoke_method
self.use_execution_layer = (spec.major == 0 and spec.minor == 10) or (spec.major == 99 and spec.minor == 0)
self.synchronous = True
diff --git a/python/qpid/testlib.py b/python/qpid/testlib.py
index 18ef030ec0..bed0d10198 100644
--- a/python/qpid/testlib.py
+++ b/python/qpid/testlib.py
@@ -108,6 +108,10 @@ Options:
# NB: AMQP 0-8 identifies itself as 8-0 for historical reasons.
return self.spec.major==8 and self.spec.minor==0
+ def use09spec(self):
+ "True if we are running with the 0-9 (non-wip) spec."
+ return self.spec.major==0 and self.spec.minor==9
+
def _parseargs(self, args):
# Defaults
self.setBroker("localhost")
@@ -157,14 +161,12 @@ Options:
if len(self.tests) == 0:
if not self.skip_self_test:
self.tests=findmodules("tests")
- if self.use08spec():
+ if self.use08spec() or self.use09spec():
self.tests+=findmodules("tests_0-8")
elif (self.spec.major == 99 and self.spec.minor == 0):
self.tests+=findmodules("tests_0-10_preview")
elif (self.spec.major == 0 and self.spec.minor == 10):
self.tests+=findmodules("tests_0-10")
- else:
- self.tests+=findmodules("tests_0-9")
def testSuite(self):
class IgnoringTestSuite(unittest.TestSuite):
@@ -232,7 +234,7 @@ class TestBase(unittest.TestCase):
self.client = self.connect()
self.channel = self.client.channel(1)
self.version = (self.client.spec.major, self.client.spec.minor)
- if self.version == (8, 0):
+ if self.version == (8, 0) or self.version == (0, 9):
self.channel.channel_open()
else:
self.channel.session_open()
@@ -278,7 +280,7 @@ class TestBase(unittest.TestCase):
def consume(self, queueName):
"""Consume from named queue returns the Queue object."""
- if testrunner.use08spec():
+ if testrunner.use08spec() or testrunner.use09spec():
reply = self.channel.basic_consume(queue=queueName, no_ack=True)
return self.client.queue(reply.consumer_tag)
else:
@@ -309,7 +311,7 @@ class TestBase(unittest.TestCase):
Publish to exchange and assert queue.get() returns the same message.
"""
body = self.uniqueString()
- if testrunner.use08spec():
+ if testrunner.use08spec() or testrunner.use09spec():
self.channel.basic_publish(
exchange=exchange,
content=Content(body, properties=properties),
@@ -319,7 +321,7 @@ class TestBase(unittest.TestCase):
destination=exchange,
content=Content(body, properties={'application_headers':properties,'routing_key':routing_key}))
msg = queue.get(timeout=1)
- if testrunner.use08spec():
+ if testrunner.use08spec() or testrunner.use09spec():
self.assertEqual(body, msg.content.body)
if (properties):
self.assertEqual(properties, msg.content.properties)
@@ -336,7 +338,7 @@ class TestBase(unittest.TestCase):
self.assertPublishGet(self.consume(queue), exchange, routing_key, properties)
def assertChannelException(self, expectedCode, message):
- if self.version == (8, 0): #or "transitional" in self.client.spec.file:
+ if self.version == (8, 0) or self.version == (0, 9):
if not isinstance(message, Message): self.fail("expected channel_close method, got %s" % (message))
self.assertEqual("channel", message.method.klass.name)
self.assertEqual("close", message.method.name)