From b7acbb27a06e7f547810f5cf23348a1a67edf457 Mon Sep 17 00:00:00 2001 From: Nicholas Guo Date: Mon, 8 Aug 2022 13:47:18 -0700 Subject: [PATCH] fix --- .../features/transactions/sendReceive_test.go | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/test/e2e-go/features/transactions/sendReceive_test.go b/test/e2e-go/features/transactions/sendReceive_test.go index 9b2375bb1a..b21ec529f8 100644 --- a/test/e2e-go/features/transactions/sendReceive_test.go +++ b/test/e2e-go/features/transactions/sendReceive_test.go @@ -139,24 +139,25 @@ func testAccountsCanSendMoney(t *testing.T, templatePath string, numberOfSends i curStatus, _ := pongClient.Status() curRound := curStatus.LastRound - if waitForTransaction { - fixture.AlgodClient = fixture.GetAlgodClientForController(fixture.GetNodeControllerForDataDir(pongClient.DataDir())) - fixture.WaitForAllTxnsToConfirm(curRound+uint64(5), pingTxidsToAddresses) - fixture.WaitForAllTxnsToConfirm(curRound+uint64(5), pongTxidsToAddresses) - } + fixture.AlgodClient = fixture.GetAlgodClientForController(fixture.GetNodeControllerForDataDir(pongClient.DataDir())) + fixture.WaitForAllTxnsToConfirm(curRound+uint64(5), pingTxidsToAddresses) + fixture.WaitForAllTxnsToConfirm(curRound+uint64(5), pongTxidsToAddresses) - pingBalance, _ = fixture.GetBalanceAndRound(pingAccount) - pongBalance, _ = fixture.GetBalanceAndRound(pongAccount) + pingBalance, err = pongClient.GetBalance(pingAccount) + a.NoError(err) + pongBalance, err = pongClient.GetBalance(pongAccount) + a.NoError(err) a.True(expectedPingBalance <= pingBalance, "ping balance is different than expected.") a.True(expectedPongBalance <= pongBalance, "pong balance is different than expected.") - if waitForTransaction { - fixture.AlgodClient = fixture.GetAlgodClientForController(fixture.GetNodeControllerForDataDir(pingClient.DataDir())) - fixture.WaitForAllTxnsToConfirm(curRound+uint64(5), pongTxidsToAddresses) - } + fixture.AlgodClient = fixture.GetAlgodClientForController(fixture.GetNodeControllerForDataDir(pingClient.DataDir())) + fixture.WaitForAllTxnsToConfirm(curRound+uint64(5), pingTxidsToAddresses) + fixture.WaitForAllTxnsToConfirm(curRound+uint64(5), pongTxidsToAddresses) - pingBalance, _ = fixture.GetBalanceAndRound(pingAccount) - pongBalance, _ = fixture.GetBalanceAndRound(pongAccount) + pingBalance, err = pingClient.GetBalance(pingAccount) + a.NoError(err) + pongBalance, err = pingClient.GetBalance(pongAccount) + a.NoError(err) a.True(expectedPingBalance <= pingBalance, "ping balance is different than expected.") a.True(expectedPongBalance <= pongBalance, "pong balance is different than expected.") }