-
Notifications
You must be signed in to change notification settings - Fork 473
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
testing: fix bug in TestAssetGroupCreateSendDestroy #3631
testing: fix bug in TestAssetGroupCreateSendDestroy #3631
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3631 +/- ##
==========================================
- Coverage 48.06% 48.04% -0.03%
==========================================
Files 381 381
Lines 62080 62080
==========================================
- Hits 29838 29825 -13
- Misses 28822 28828 +6
- Partials 3420 3427 +7
Continue to review full report at Codecov.
|
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.
Looks great.
Just one comment to confirm my understanding.
a.NoError(err) | ||
|
||
// wait for client1 to reach the same round as client0 | ||
_, err = client1.WaitForRound(status0.LastRound) |
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.
So, I understand that the idea here is that both nodes agree on the block with all the transactions, client0
adds the block in its ledger, returns confirmed
on line 638.
However, it could be possible that client1
has not yet added the block and advanced the round, and the client1.AssetInformation(assetID1)
fails.
So, by client1.WaitForRound(status0.LastRound)
you are making sure that client1
has also added the block before calling client1.AssetInformation(assetID1)
.
Is this right?
Exactly
…On Mon, Feb 14, 2022, 23:00 Shant Karakashian ***@***.***> wrote:
***@***.**** approved this pull request.
Looks great.
Just one comment to confirm my understanding.
------------------------------
In test/e2e-go/features/transactions/asset_test.go
<#3631 (comment)>:
> a.True(confirmed)
+ status0, err = client0.Status()
+ a.NoError(err)
+
+ // wait for client1 to reach the same round as client0
+ _, err = client1.WaitForRound(status0.LastRound)
So, I understand that the idea here is that both nodes agree on the block
with all the transactions, client0 adds the block in its ledger, returns
confirmed on line 638.
However, it could be possible that client1 has not yet added the block
and advanced the round, and the client1.AssetInformation(assetID1) fails.
So, by client1.WaitForRound(status0.LastRound) you are making sure that
client1 has also added the block before calling
client1.AssetInformation(assetID1).
Is this right?
—
Reply to this email directly, view it on GitHub
<#3631 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF2OOH7MGONRXEFWVAOYIT3U3HFUVANCNFSM5ONF47HQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
Summary
Fix a bug in TestAssetGroupCreateSendDestroy. The test uses two nodes, sending transaction to one and checking the state on the other. Before checking, the test need to verify that both nodes successfully reached the same round number.
Test Plan
This is a test.