Tests: Fix txid-string comparison#4792
Merged
Merged
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 |
jasonpaulos
reviewed
Nov 15, 2022
Contributor
jasonpaulos
left a comment
There was a problem hiding this comment.
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++ { |
Contributor
There was a problem hiding this comment.
consider using WaitForTxnConfirmation
algorandskiy
approved these changes
Nov 15, 2022
jasonpaulos
approved these changes
Nov 16, 2022
michaeldiamant
approved these changes
Nov 16, 2022
Contributor
michaeldiamant
left a comment
There was a problem hiding this comment.
@algochoi Thanks for supplying these fixes!
This was referenced Nov 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.