Skip to content

Commit 6b85209

Browse files
authored
Tests: Fix txid-string comparison (#4792)
1 parent bffd703 commit 6b85209

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

test/e2e-go/features/transactions/accountv2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ int 1
312312
resp, err := client.GetParsedPendingTransactions(2)
313313
a.NoError(err)
314314
if resp.TotalTransactions == 1 {
315-
a.Equal(resp.TopTransactions[0].Txn.ID(), txid)
315+
a.Equal(resp.TopTransactions[0].Txn.ID().String(), txid)
316316
continue
317317
}
318318
a.Equal(uint64(0), resp.TotalTransactions)

test/e2e-go/upgrades/application_support_test.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -448,18 +448,14 @@ int 1
448448
a.NoError(err)
449449
signedTxn, err = client.SignTransactionWithWallet(wh, nil, tx)
450450
a.NoError(err)
451-
_, err = client.BroadcastTransaction(signedTxn)
451+
txid, err := client.BroadcastTransaction(signedTxn)
452452
a.NoError(err)
453453

454-
curStatus, err = client.Status()
455-
a.NoError(err)
456-
457-
round = curStatus.LastRound
458-
459-
client.WaitForRound(round + 2)
460-
pendingTx, err = client.GetPendingTransactions(1)
454+
// Try polling 10 rounds to ensure txn is committed.
455+
round, err = client.CurrentRound()
461456
a.NoError(err)
462-
a.Equal(uint64(0), pendingTx.TotalTransactions)
457+
isCommitted := fixture.WaitForTxnConfirmation(round+10, creator, txid)
458+
a.True(isCommitted)
463459

464460
// check creator's balance record for the app entry and the state changes
465461
ad, err = client.AccountData(creator)

0 commit comments

Comments
 (0)