Skip to content

Commit

Permalink
fix: timeout tests after timeout as seconds.
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrisJim committed Oct 17, 2024
1 parent a3a61ff commit ac25609
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/core/04-channel/v2/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"time"

sdk "github.com/cosmos/cosmos-sdk/types"

Expand Down Expand Up @@ -484,8 +483,8 @@ func (suite *KeeperTestSuite) TestMsgTimeout() {
{
name: "failure: unable to timeout if packet has been received",
malleate: func() {
err := path.EndpointB.MsgRecvPacket(packet)
suite.Require().NoError(err)
suite.chainB.App.GetIBCKeeper().ChannelKeeperV2.SetPacketReceipt(suite.chainB.GetContext(), packet.SourceChannel, packet.Sequence)
suite.Require().NoError(path.EndpointB.UpdateClient())
},
expError: commitmenttypes.ErrInvalidProof,
},
Expand All @@ -498,7 +497,7 @@ func (suite *KeeperTestSuite) TestMsgTimeout() {
path.SetupV2()

// Send packet from A to B
timeoutTimestamp := suite.chainA.GetTimeoutTimestamp()
timeoutTimestamp := uint64(suite.chainA.GetContext().BlockTime().Unix())
mockData := mockv2.NewMockPacketData(mockv2.ModuleNameA, mockv2.ModuleNameB)

var err error
Expand All @@ -508,7 +507,6 @@ func (suite *KeeperTestSuite) TestMsgTimeout() {

tc.malleate()

suite.coordinator.IncrementTimeBy(time.Hour * 20)
suite.Require().NoError(path.EndpointA.UpdateClient())

err = path.EndpointA.MsgTimeoutPacket(packet)
Expand Down

0 comments on commit ac25609

Please sign in to comment.