-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Tests: Fix txid-string comparison #4792
Conversation
…tionsUpgradeOverGossip
Codecov Report
@@ Coverage Diff @@
## master #4792 +/- ##
==========================================
- Coverage 54.68% 54.67% -0.01%
==========================================
Files 414 414
Lines 53550 53550
==========================================
- Hits 29286 29281 -5
- Misses 21836 21842 +6
+ Partials 2428 2427 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good improvement, both because of the fixed comparison and because of the more responsive waiting period.
a.Equal(uint64(0), pendingTx.TotalTransactions) | ||
// Try polling 10 rounds to ensure txn is committed. | ||
isCommitted := false | ||
for i := 0; i < 10; i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider using WaitForTxnConfirmation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@algochoi Thanks for supplying these fixes!
Summary
This PR fixes the build where there was a type mismatch in an assertion between the TxID bytes and string. One existing test failed if the transaction was not committed in the next 2 rounds, so this PR adds a loop to wait if that is the case.
Test Plan
Re-run tests.