From b29ba8b5e3a55648f3753e9f4d12b13e1bee18e0 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Wed, 28 Jun 2023 10:37:10 +0200 Subject: [PATCH 1/3] Bump seq in ibctests for failed messages as well --- x/wasm/ibctesting/chain.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/x/wasm/ibctesting/chain.go b/x/wasm/ibctesting/chain.go index cfa540ced8..f12ffb3c7f 100644 --- a/x/wasm/ibctesting/chain.go +++ b/x/wasm/ibctesting/chain.go @@ -358,7 +358,7 @@ func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) { // ensure the chain has the latest time chain.Coordinator.UpdateTimeForChain(chain) - _, r, err := app.SignAndDeliverWithoutCommit( + _, r, gotErr := app.SignAndDeliverWithoutCommit( chain.t, chain.TxConfig, chain.App.GetBaseApp(), @@ -369,21 +369,18 @@ func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) { []uint64{chain.SenderAccount.GetSequence()}, chain.SenderPrivKey, ) - if err != nil { - return nil, err - } // NextBlock calls app.Commit() chain.NextBlock() - // increment sequence for successful transaction execution - err = chain.SenderAccount.SetSequence(chain.SenderAccount.GetSequence() + 1) - if err != nil { - return nil, err - } - + // increment sequence for successful and failed transaction execution + require.NoError(chain.t, chain.SenderAccount.SetSequence(chain.SenderAccount.GetSequence()+1)) chain.Coordinator.IncrementTime() + if gotErr != nil { + return nil, gotErr + } + chain.CaptureIBCEvents(r) return r, nil From 1b233bc30b270b031237d9a4a71b074211faf565 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Wed, 28 Jun 2023 11:24:34 +0200 Subject: [PATCH 2/3] Increase wait time for system tests --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6e4eb965d5..b78ff298b3 100644 --- a/Makefile +++ b/Makefile @@ -152,7 +152,7 @@ test-sim-deterministic: runsim @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 1 1 TestAppStateDeterminism test-system: install - @VERSION=$(VERSION) cd tests/system; go test -mod=readonly -failfast -tags='system_test' ./... --wait-time=45s --verbose; EXIT_CODE=$$?; cd -; exit $$EXIT_CODE + @VERSION=$(VERSION) cd tests/system; go test -mod=readonly -failfast -tags='system_test' ./... --wait-time=60s --verbose; EXIT_CODE=$$?; cd -; exit $$EXIT_CODE ############################################################################### ### Linting ### From abd1bd7382bc851443cd2de4557000236f3f56e9 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Wed, 28 Jun 2023 11:39:06 +0200 Subject: [PATCH 3/3] Revert "Increase wait time for system tests" This reverts commit 1b233bc30b270b031237d9a4a71b074211faf565. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b78ff298b3..6e4eb965d5 100644 --- a/Makefile +++ b/Makefile @@ -152,7 +152,7 @@ test-sim-deterministic: runsim @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 1 1 TestAppStateDeterminism test-system: install - @VERSION=$(VERSION) cd tests/system; go test -mod=readonly -failfast -tags='system_test' ./... --wait-time=60s --verbose; EXIT_CODE=$$?; cd -; exit $$EXIT_CODE + @VERSION=$(VERSION) cd tests/system; go test -mod=readonly -failfast -tags='system_test' ./... --wait-time=45s --verbose; EXIT_CODE=$$?; cd -; exit $$EXIT_CODE ############################################################################### ### Linting ###