diff options
author | Rafael H. Schloming <rhs@apache.org> | 2008-06-16 23:25:01 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2008-06-16 23:25:01 +0000 |
commit | 3f23de2976509220a588be4a69469c9ee70e0789 (patch) | |
tree | 223d9c746a9d7e33ea8a2f103c95870264eccf92 /python/tests/connection.py | |
parent | 70a2a643f61aa1450fcdc0f754870301e29b3553 (diff) | |
download | qpid-python-3f23de2976509220a588be4a69469c9ee70e0789.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/qpid@668344 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests/connection.py')
-rw-r--r-- | python/tests/connection.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/python/tests/connection.py b/python/tests/connection.py index 88620bc1c6..23e0c937fb 100644 --- a/python/tests/connection.py +++ b/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) |