From edf9e53ea5cd14ec7fde9c560fc9571adaecd6c0 Mon Sep 17 00:00:00 2001 From: violet Date: Mon, 13 Jan 2025 11:57:28 -0500 Subject: [PATCH 1/2] fix(ci): Fix for the feemarket test misconfiguring validators --- tests/interchain/chainsuite/chain.go | 3 ++- tests/interchain/validator/config_test.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/interchain/chainsuite/chain.go b/tests/interchain/chainsuite/chain.go index c67d317453..edd99c7da5 100644 --- a/tests/interchain/chainsuite/chain.go +++ b/tests/interchain/chainsuite/chain.go @@ -461,7 +461,7 @@ func (c *Chain) ModifyConfig(ctx context.Context, testName interchaintest.TestNa eg := errgroup.Group{} if len(validators) == 0 { validators = make([]int, len(c.Validators)) - for _, valIdx := range validators { + for valIdx := range validators { validators[valIdx] = valIdx } } @@ -486,5 +486,6 @@ func (c *Chain) ModifyConfig(ctx context.Context, testName interchaintest.TestNa if err := eg.Wait(); err != nil { return err } + time.Sleep(30 * time.Second) return nil } diff --git a/tests/interchain/validator/config_test.go b/tests/interchain/validator/config_test.go index 01f671fd1c..f02ae418c2 100644 --- a/tests/interchain/validator/config_test.go +++ b/tests/interchain/validator/config_test.go @@ -52,6 +52,7 @@ func (s *ConfigSuite) TestNoIndexingTransactions() { s.Require().NoError(err) tx := cosmos.CosmosTx{} s.Require().NoError(json.Unmarshal(stdout, &tx)) + s.Require().Equal(0, tx.Code, tx.RawLog) s.Require().NoError(testutil.WaitForBlocks(s.GetContext(), 2, s.Chain)) txResult, err := s.Chain.Validators[1].GetTransaction( From 20783e2fe0c9fbf117e9ba2eba79b2b63edf4b8e Mon Sep 17 00:00:00 2001 From: violet Date: Mon, 13 Jan 2025 13:18:31 -0500 Subject: [PATCH 2/2] fix(ci): fix a flake in the config test --- tests/interchain/validator/config_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/interchain/validator/config_test.go b/tests/interchain/validator/config_test.go index f02ae418c2..1d0cfaeec7 100644 --- a/tests/interchain/validator/config_test.go +++ b/tests/interchain/validator/config_test.go @@ -115,20 +115,22 @@ func (s *ConfigSuite) TestPeerLimit() { } s.Require().NoError(s.Chain.Validators[0].SetPeers(s.GetContext(), "")) + s.Require().NoError(s.Chain.StopAllNodes(s.GetContext())) + s.Require().NoError(s.Chain.StartAllNodes(s.GetContext())) + s.Require().NoError(testutil.WaitForBlocks(s.GetContext(), 2, s.Chain)) + p2p := make(testutil.Toml) p2p["max_num_inbound_peers"] = 2 // disable pex so that we can control the number of peers - // p2p["pex"] = false + p2p["pex"] = false configToml := make(testutil.Toml) configToml["p2p"] = p2p err = s.Chain.ModifyConfig( s.GetContext(), s.T(), map[string]testutil.Toml{"config/config.toml": configToml}, + 0, ) - if err != nil { - // it's okay if one of the nodes has 0 peers and fails to start - s.Require().Contains(err.Error(), "still catching up") - } + s.Require().NoError(err) s.Require().NoError(testutil.WaitForBlocks(s.GetContext(), 4, s.Chain))