You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2015/01/26 18:19:34 UTC
qpid-proton git commit: Fix bugs in testing of examples
Repository: qpid-proton
Updated Branches:
refs/heads/master ddf899e34 -> ce21ce6e4
Fix bugs in testing of examples
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/ce21ce6e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/ce21ce6e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/ce21ce6e
Branch: refs/heads/master
Commit: ce21ce6e4c55d3300eed9003febd399bb1212312
Parents: ddf899e
Author: Gordon Sim <gs...@redhat.com>
Authored: Mon Jan 26 17:19:29 2015 +0000
Committer: Gordon Sim <gs...@redhat.com>
Committed: Mon Jan 26 17:19:29 2015 +0000
----------------------------------------------------------------------
examples/engine/py/server_tx.py | 2 +-
examples/engine/py/test_examples.py | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ce21ce6e/examples/engine/py/server_tx.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/server_tx.py b/examples/engine/py/server_tx.py
index 0305a3f..ce43973 100755
--- a/examples/engine/py/server_tx.py
+++ b/examples/engine/py/server_tx.py
@@ -31,7 +31,7 @@ class TxRequest(TransactionHandler):
def on_transaction_declared(self, event):
self.sender.send_msg(self.response, transaction=event.transaction)
- self.accept(self.request_delivery, transaction=event.transaction)
+ event.transaction.accept(self.request_delivery)
event.transaction.commit()
def on_transaction_committed(self, event):
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ce21ce6e/examples/engine/py/test_examples.py
----------------------------------------------------------------------
diff --git a/examples/engine/py/test_examples.py b/examples/engine/py/test_examples.py
index 4ea09cf..f46bd9f 100644
--- a/examples/engine/py/test_examples.py
+++ b/examples/engine/py/test_examples.py
@@ -49,8 +49,8 @@ class ExamplesTest(unittest.TestCase):
self.assertEqual(actual, expected)
def test_client_server(self, client='client.py', server='server.py'):
- s = subprocess.Popen(['server.py'], stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
- c = subprocess.Popen(['client.py'], stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
+ s = subprocess.Popen([server], stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
+ c = subprocess.Popen([client], stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
c.wait()
actual = [l.strip() for l in c.stdout]
inputs = ["Twas brillig, and the slithy toves",
@@ -64,11 +64,11 @@ class ExamplesTest(unittest.TestCase):
def test_sync_client_server(self):
self.test_client_server(client='sync_client.py')
- def test_client_tx_server(self):
- self.test_client_server(server='tx_server.py')
+ def test_client_server_tx(self):
+ self.test_client_server(server='server_tx.py')
- def test_sync_client_tx_server(self):
- self.test_client_server(client='sync_client.py', server='tx_server.py')
+ def test_sync_client_server_tx(self):
+ self.test_client_server(client='sync_client.py', server='server_tx.py')
def test_db_send_recv(self):
self.maxDiff = None
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org