@@ -39,7 +39,7 @@ class TestCase(test_env.BaseAsyncTestCase):
3939 async def test_7400 (self ):
4040 "7400 - test begin, prepare, roll back global transaction"
4141 await self .cursor .execute ("truncate table TestTempTable" )
42- xid = self .conn .xid (3900 , "txn3900" , "branchId" )
42+ xid = self .conn .xid (3900 , b "txn3900" , b "branchId" )
4343 await self .conn .tpc_begin (xid )
4444 self .assertEqual (await self .conn .tpc_prepare (), False )
4545 await self .conn .tpc_begin (xid )
@@ -77,7 +77,7 @@ async def test_7402(self):
7777 "7402 - test multiple global transactions on the same connection"
7878 await self .cursor .execute ("truncate table TestTempTable" )
7979 xid1 = self .conn .xid (3902 , "txn3902" , "branch1" )
80- xid2 = self .conn .xid (3902 , "txn3902" , "branch2" )
80+ xid2 = self .conn .xid (3902 , b "txn3902" , b "branch2" )
8181 await self .conn .tpc_begin (xid1 )
8282 await self .cursor .execute (
8383 """
@@ -109,7 +109,7 @@ async def test_7402(self):
109109 async def test_7403 (self ):
110110 "7403 - test rollback with parameter xid"
111111 await self .cursor .execute ("truncate table TestTempTable" )
112- xid1 = self .conn .xid (3901 , "txn3901" , "branch1" )
112+ xid1 = self .conn .xid (3901 , b "txn3901" , b "branch1" )
113113 xid2 = self .conn .xid (3902 , "txn3902" , "branch2" )
114114 for count , xid in enumerate ([xid1 , xid2 ]):
115115 await self .conn .tpc_begin (xid )
@@ -181,7 +181,7 @@ async def test_7406(self):
181181 "7406 - test ending a transaction with parameter xid"
182182 await self .cursor .execute ("truncate table TestTempTable" )
183183 xid1 = self .conn .xid (7406 , "txn7406a" , "branch3" )
184- xid2 = self .conn .xid (7406 , "txn7406b" , "branch4" )
184+ xid2 = self .conn .xid (7406 , b "txn7406b" , b "branch4" )
185185 await self .conn .tpc_begin (xid1 )
186186 await self .cursor .execute (
187187 """
@@ -225,15 +225,13 @@ async def test_7407(self):
225225 await self .cursor .execute ("select * from DBA_PENDING_TRANSACTIONS" )
226226 self .assertEqual (await self .cursor .fetchall (), recovers )
227227
228- for format_id , txn , branch in recovers :
229- if format_id % 2 == 0 :
230- xid = self .conn .xid (format_id , txn , branch )
228+ for xid in recovers :
229+ if xid .format_id % 2 == 0 :
231230 await self .conn .tpc_commit (xid )
232231 recovers = await self .conn .tpc_recover ()
233232 self .assertEqual (len (recovers ), n_xids // 2 )
234233
235- for format_id , txn , branch in recovers :
236- xid = self .conn .xid (format_id , txn , branch )
234+ for xid in recovers :
237235 await self .conn .tpc_rollback (xid )
238236 recovers = await self .conn .tpc_recover ()
239237 self .assertEqual (len (recovers ), 0 )
0 commit comments