-
Notifications
You must be signed in to change notification settings - Fork 624
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
Fix E2E Memo test for broken versions #3028
Comments
It looks like this is an issue with how the func BroadcastTx(ctx context.Context, broadcaster *Broadcaster, broadcastingUser
}
err = testutil.WaitForCondition(time.Second*30, time.Second*5, func() (bool, error) {
- _, err := broadcaster.GetTxResponseBytes(ctx, broadcastingUser)
+ var err error
+ txBytes, err = broadcaster.GetTxResponseBytes(ctx, broadcastingUser)
if err != nil {
return false, nil
}
@@ -217,11 +218,6 @@ func BroadcastTx(ctx context.Context, broadcaster *Broadcaster, broadcastingUser
return sdk.TxResponse{}, err
}
- txBytes, err = broadcaster.GetTxResponseBytes(ctx, broadcastingUser)
- if err != nil {
- return sdk.TxResponse{}, err
- }
-
respWithTxHash, err := broadcaster.UnmarshalTxResponseBytes(ctx, txBytes)
if err != nil {
return sdk.TxResponse{}, err
@@ -229,8 +225,13 @@ func BroadcastTx(ctx context.Context, broadcaster *Broadcaster, broadcastingUser
resp, err := authTx.QueryTx(cc, respWithTxHash.TxHash)
if err != nil {
- return sdk.TxResponse{}, err
+ // if we fail to query the tx, it means an error occurred with the original message broadcast.
+ // we should return this instead.
+ originalResp, err := broadcaster.UnmarshalTxResponseBytes(ctx, txBytes)
+ if err != nil {
+ return sdk.TxResponse{}, err
+ }
+ return originalResp, nil
}
-
return *resp, nil
} We can wait for the sdk 47 PR to get merged in ibc test before making these changes. I don't think this is a big priority anymore as this confirms that the test still works, it was just an issue with the broadcast function. |
I created a PR against the sdk 47 branch here |
Summary of Bug
depends on #3026
The
TestMsgTransfer_WithMemo
is failing in certain configurations. See the following workflow to see the full failures.The failing tests seem to all have this error:
Expected Behaviour
The test should account for these versions and should pass.
Version
The following table shows which tests are broken.
Steps to Reproduce
Run the
TestMsgTransfer_WithMemo
with any of these versions.For Admin Use
The text was updated successfully, but these errors were encountered: