From df698c95d2efa708c074e1fbe6c247e9608322e2 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 3 Jul 2023 09:12:46 +0800 Subject: [PATCH 1/4] avoid invalid Bech32 prefix due to singleton GetConfig --- interchaintest/misbehaviour_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/interchaintest/misbehaviour_test.go b/interchaintest/misbehaviour_test.go index 7ce55196e..2591383ae 100644 --- a/interchaintest/misbehaviour_test.go +++ b/interchaintest/misbehaviour_test.go @@ -43,8 +43,6 @@ func TestScenarioMisbehaviourDetection(t *testing.T) { t.Skip() } - t.Parallel() - numVals := 1 numFullNodes := 0 cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ From 6c760cb1006d190ec42521ed0929c0d09d38196b Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 3 Jul 2023 09:49:13 +0800 Subject: [PATCH 2/4] add change doc --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b7e44543..6fff57138 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ * [\#1205](https://github.com/cosmos/relayer/pull/1205) Update ibc-go to v7.0.1. * [\#1179](https://github.com/cosmos/relayer/pull/1179) Add extension-options parameter in chain configs and update SDK to v0.47.3. * [\#1208](https://github.com/cosmos/relayer/pull/1208) Replace gogo/protobuf to cosmos/gogoproto. +* [\#1226](https://github.com/cosmos/relayer/pull/1226) Avoid invalid Bech32 prefix error in parallel tests when sdk Config get overwritten by each other in single process. ## v0.9.3 From 15143fe330d2d5330922b42b07419b6f73590bd7 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 3 Jul 2023 10:55:08 +0800 Subject: [PATCH 3/4] separate process in ci --- .github/workflows/interchaintest.yml | 22 ++++++++++++++++++++++ Makefile | 3 +++ interchaintest/misbehaviour_test.go | 4 +++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/interchaintest.yml b/.github/workflows/interchaintest.yml index 402e55bda..963d1cfaf 100644 --- a/.github/workflows/interchaintest.yml +++ b/.github/workflows/interchaintest.yml @@ -73,6 +73,28 @@ jobs: - name: interchaintest run: make interchaintest-multiple + misbehaviour: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.20 + uses: actions/setup-go@v1 + with: + go-version: 1.20 + id: go + + - name: checkout relayer + uses: actions/checkout@v2 + + - uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: interchaintest + run: make interchaintest-misbehaviour + scenarios: runs-on: ubuntu-latest steps: diff --git a/Makefile b/Makefile index 2d2c71a57..43717b5ab 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,9 @@ interchaintest-legacy: interchaintest-multiple: cd interchaintest && go test -race -v -run TestRelayerMultiplePathsSingleProcess . +interchaintest-misbehaviour: + cd interchaintest && go test -race -v -run TestRelayerMisbehaviourDetection . + interchaintest-scenario: ## Scenario tests are suitable for simple networks of 1 validator and no full nodes. They test specific functionality. cd interchaintest && go test -timeout 30m -race -v -run TestScenario ./... diff --git a/interchaintest/misbehaviour_test.go b/interchaintest/misbehaviour_test.go index 2591383ae..2dc8b4656 100644 --- a/interchaintest/misbehaviour_test.go +++ b/interchaintest/misbehaviour_test.go @@ -38,11 +38,13 @@ import ( "go.uber.org/zap/zaptest" ) -func TestScenarioMisbehaviourDetection(t *testing.T) { +func TestRelayerMisbehaviourDetection(t *testing.T) { if testing.Short() { t.Skip() } + t.Parallel() + numVals := 1 numFullNodes := 0 cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ From 295c63744e22690f358b53a9fbd6ab864b221967 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 3 Jul 2023 11:26:29 +0800 Subject: [PATCH 4/4] separate fee middleware test for juno --- .github/workflows/interchaintest.yml | 22 ++++++++++++++++++++++ Makefile | 3 +++ interchaintest/fee_middleware_test.go | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/interchaintest.yml b/.github/workflows/interchaintest.yml index 963d1cfaf..814b44289 100644 --- a/.github/workflows/interchaintest.yml +++ b/.github/workflows/interchaintest.yml @@ -95,6 +95,28 @@ jobs: - name: interchaintest run: make interchaintest-misbehaviour + fee-middleware: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.20 + uses: actions/setup-go@v1 + with: + go-version: 1.20 + id: go + + - name: checkout relayer + uses: actions/checkout@v2 + + - uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: interchaintest + run: make interchaintest-fee-middleware + scenarios: runs-on: ubuntu-latest steps: diff --git a/Makefile b/Makefile index 43717b5ab..66f67961d 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,9 @@ interchaintest-multiple: interchaintest-misbehaviour: cd interchaintest && go test -race -v -run TestRelayerMisbehaviourDetection . +interchaintest-fee-middleware: + cd interchaintest && go test -race -v -run TestRelayerFeeMiddleware . + interchaintest-scenario: ## Scenario tests are suitable for simple networks of 1 validator and no full nodes. They test specific functionality. cd interchaintest && go test -timeout 30m -race -v -run TestScenario ./... diff --git a/interchaintest/fee_middleware_test.go b/interchaintest/fee_middleware_test.go index 71d65d616..32554cf2a 100644 --- a/interchaintest/fee_middleware_test.go +++ b/interchaintest/fee_middleware_test.go @@ -16,7 +16,7 @@ import ( "go.uber.org/zap/zaptest" ) -func TestScenarioFeeMiddleware(t *testing.T) { +func TestRelayerFeeMiddleware(t *testing.T) { if testing.Short() { t.Skip() }