diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2010-04-13 18:28:34 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2010-04-13 18:28:34 +0000 |
| commit | 8f9055bebd3252c231f9c0fcd2018d03f7afc20a (patch) | |
| tree | 4e2d834d500b594f898895201443666d69be7a0d /python | |
| parent | 26c49e68566ba26521a2a888d0b88d3e1440e011 (diff) | |
| download | qpid-python-8f9055bebd3252c231f9c0fcd2018d03f7afc20a.tar.gz | |
fixed a hang in commit and added testDoubleCommit
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@933734 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
| -rw-r--r-- | python/qpid/messaging/driver.py | 1 | ||||
| -rw-r--r-- | python/qpid/tests/messaging/endpoints.py | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/python/qpid/messaging/driver.py b/python/qpid/messaging/driver.py index 934b5c02cc..8463aead13 100644 --- a/python/qpid/messaging/driver.py +++ b/python/qpid/messaging/driver.py @@ -1020,6 +1020,7 @@ class Engine: ssn.committed = True ssn.aborting = False ssn.aborted = False + sst.committing = False sst.write_cmd(TxCommit(), commit_ok) sst.committing = True diff --git a/python/qpid/tests/messaging/endpoints.py b/python/qpid/tests/messaging/endpoints.py index 6a5cecf3b1..91940a881e 100644 --- a/python/qpid/tests/messaging/endpoints.py +++ b/python/qpid/tests/messaging/endpoints.py @@ -483,6 +483,18 @@ class SessionTests(Base): def testRollbackAck(self): self.txTestAck(False) + def testDoubleCommit(self): + ssn = self.conn.session(transactional=True) + snd = ssn.sender("amq.direct") + rcv = ssn.receiver("amq.direct") + msgs = [self.message("testDoubleCommit", i) for i in range(3)] + for m in msgs: + snd.send(m) + ssn.commit() + self.drain(rcv, expected=msgs) + ssn.acknowledge() + ssn.commit() + def testClose(self): self.ssn.close() try: |
