summaryrefslogtreecommitdiff
path: root/qpid/python/tests
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-06-16 23:25:01 +0000
committerRafael H. Schloming <rhs@apache.org>2008-06-16 23:25:01 +0000
commit4d9b122efd40ea20ceb4dd9927cb0e0af1a2ed96 (patch)
tree2e237f73c6d1b1352faa7089258583ec0a09620a /qpid/python/tests
parentead2afe07e0d0b3ba383cca4ea77177218b4d080 (diff)
downloadqpid-python-4d9b122efd40ea20ceb4dd9927cb0e0af1a2ed96.tar.gz
QPID-1142: made session.sync() always set the sync flag on execution_sync
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@668344 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests')
-rw-r--r--qpid/python/tests/connection.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/qpid/python/tests/connection.py b/qpid/python/tests/connection.py
index 88620bc1c6..23e0c937fb 100644
--- a/qpid/python/tests/connection.py
+++ b/qpid/python/tests/connection.py
@@ -48,6 +48,9 @@ class TestSession(Delegate):
self.session = session
self.queue = queue
+ def execution_sync(self, es):
+ pass
+
def queue_query(self, qq):
return qq._type.result.type.new((qq.queue,), {})
@@ -90,8 +93,11 @@ class ConnectionTest(TestCase):
connect("0.0.0.0", PORT).close()
self.server.join(3)
+ def connect(self):
+ return Connection(connect("0.0.0.0", PORT), self.spec)
+
def test(self):
- c = Connection(connect("0.0.0.0", PORT), self.spec)
+ c = self.connect()
c.start(10)
ssn1 = c.session("test1", timeout=10)
@@ -144,7 +150,7 @@ class ConnectionTest(TestCase):
c.close(5)
def testCloseGet(self):
- c = Connection(connect("0.0.0.0", PORT), self.spec)
+ c = self.connect()
c.start(10)
ssn = c.session("test", timeout=10)
echos = ssn.incoming("echo")
@@ -166,7 +172,7 @@ class ConnectionTest(TestCase):
pass
def testCloseListen(self):
- c = Connection(connect("0.0.0.0", PORT), self.spec)
+ c = self.connect()
c.start(10)
ssn = c.session("test", timeout=10)
echos = ssn.incoming("echo")
@@ -198,3 +204,11 @@ class ConnectionTest(TestCase):
assert m.body == "test%d" % i
assert len(exceptions) == 1
+
+ def testSync(self):
+ c = self.connect()
+ c.start(10)
+ s = c.session("test")
+ s.auto_sync = False
+ s.message_transfer("echo", message=Message("test"))
+ s.sync(10)