Hi folks,
Can someone please help me find where the python Xid comparator function
is? I've searched everywhere I can think of.
I have a test case failing while trying to compare a created xid with
one retrieved from the broker:
I'm doing this:
def xid(self, txid):
StoreTests.tx_counter += 1
branchqual = "v%s" % StoreTests.tx_counter
return self.ssn.xid(format=0, global_id=txid, branch_id=branchqual)
...
txid = self.xid("DtxRecoverPrepared")
self.ssn.dtx_select()
self.ssn.dtx_start(xid=txid)
self.ssn.message_transfer(message=Message(self.ssn.delivery_properties(r
outing_key="Dtx"), "transactional message"))
self.ssn.dtx_end(xid=txid)
self.assertEqual(self.XA_OK, self.ssn.dtx_prepare(xid=txid).status)
# Cycle the broker and make sure the xid is there, the message is
not
# queued.
self.cycle_broker()
# The txid should be recovered and in doubt
xids = self.ssn.dtx_recover().in_doubt
xid_matched = False
for x in xids:
self.assertEqual(txid, x)
xid_matched = True
self.assert_(xid_matched)
And the assertEqual(txid, x) is failing:
File "C:\Python26\lib\unittest.py", line 350, in failUnlessEqual
(msg or '%r != %r' % (first, second))
AssertionError: Xid(format=0, global_id='DtxRecoverPrepared',
branch_id='v1') != Xid(format=0, global_id='DtxRecoverPrepared',
branch_id='v1')
It looks, from the assert message, that the xids match and I'm trying to
find out why the compare is failing.
Thanks,
-Steve
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]