Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix TestAccountsCanSendMoney #2 #4374

Merged

Conversation

ghost
Copy link

@ghost ghost commented Aug 8, 2022

Summary

The TestAccountsCanSendMoney test is still flaky and this pr aims to fix it. Another problem observed was that the test aims to check the balances of both accounts are correct on both ping and pong nodes by calling the fixture.GetBalanceAndRound function. However this function always calls the ping node and never the pong node. Thus we have logic which first ensures that the txns are confirmed on the pong node, then incorrectly checks the balances on the ping node instead of the pong node. The ping node may be out of sync and return the wrong balances.

This pr corrects this by checking the balance on the pong node instead of the ping node.

Test Plan

This is a test.

@ghost ghost self-assigned this Aug 8, 2022
@ghost ghost assigned algorandskiy and unassigned algorandskiy Aug 8, 2022
@ghost ghost requested a review from algorandskiy August 8, 2022 20:53
Copy link
Contributor

@algorandskiy algorandskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good to me, thank you

@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #4374 (b7acbb2) into master (d7ed271) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4374      +/-   ##
==========================================
- Coverage   55.28%   55.24%   -0.05%     
==========================================
  Files         395      395              
  Lines       50352    50352              
==========================================
- Hits        27838    27815      -23     
- Misses      20119    20144      +25     
+ Partials     2395     2393       -2     
Impacted Files Coverage Δ
network/wsPeer.go 65.47% <0.00%> (-2.47%) ⬇️
node/node.go 23.01% <0.00%> (-2.39%) ⬇️
crypto/merkletrie/trie.go 66.42% <0.00%> (-2.19%) ⬇️
crypto/merkletrie/node.go 91.62% <0.00%> (-1.87%) ⬇️
data/transactions/verify/txn.go 44.00% <0.00%> (-0.89%) ⬇️
network/wsNetwork.go 64.89% <0.00%> (-0.29%) ⬇️
ledger/tracker.go 76.49% <0.00%> (ø)
catchup/service.go 69.38% <0.00%> (+0.49%) ⬆️
cmd/tealdbg/debugger.go 73.49% <0.00%> (+0.80%) ⬆️
data/abi/abi_type.go 88.62% <0.00%> (+0.94%) ⬆️
... and 2 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants