Skip to content

Commit

Permalink
fix: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZexiao committed Nov 11, 2022
1 parent 8466fc6 commit 8d2a2ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions integration_test/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func testListFailedMessage(ctx context.Context, t *testing.T, api messager.IMess
assert.Equal(t, len(msgs), len(list))
for _, msg := range list {
assert.Equal(t, types.UnFillMsg, msg.State)
assert.True(t, strings.Contains(string(msg.Receipt.Return), testhelper.ErrGasLimitNegative.Error()))
assert.True(t, strings.Contains(msg.ErrorMsg, testhelper.ErrGasLimitNegative.Error()))
}

// mark bad message
Expand Down Expand Up @@ -488,7 +488,7 @@ func testUpdateMessageStateByID(ctx context.Context, t *testing.T, api messager.
assert.Equal(t, len(msgs), len(list))
for _, msg := range list {
assert.Equal(t, types.UnFillMsg, msg.State)
assert.True(t, strings.Contains(string(msg.Receipt.Return), testhelper.ErrGasLimitNegative.Error()))
assert.True(t, strings.Contains(msg.ErrorMsg, testhelper.ErrGasLimitNegative.Error()))
}

for _, msg := range msgs {
Expand Down
4 changes: 2 additions & 2 deletions service/message_selector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func TestEstimateMessageGas(t *testing.T) {
for _, msg := range list {
_, ok := msgsMap[msg.ID]
assert.True(t, ok)
assert.Contains(t, string(msg.Receipt.Return), testhelper.ErrGasLimitNegative.Error())
assert.Contains(t, msg.ErrorMsg, testhelper.ErrGasLimitNegative.Error())

assert.NoError(t, ms.MarkBadMessage(ctx, msg.ID))
res, err := ms.GetMessageByUid(ctx, msg.ID)
Expand Down Expand Up @@ -554,7 +554,7 @@ func TestSignMessageFailed(t *testing.T) {
for _, errInfo := range selectResult.ErrMsg {
res, err := ms.GetMessageByUid(ctx, errInfo.id)
assert.NoError(t, err)
assert.Contains(t, string(res.Receipt.Return), signMsg)
assert.Contains(t, res.ErrorMsg, signMsg)

_, ok := removedAddrMap[res.From]
assert.True(t, ok)
Expand Down

0 comments on commit 8d2a2ba

Please sign in to comment.