Skip to content

Commit

Permalink
fix(ci): fix a flake in the config test
Browse files Browse the repository at this point in the history
  • Loading branch information
fastfadingviolets committed Jan 13, 2025
1 parent edf9e53 commit 20783e2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/interchain/validator/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 20783e2

Please sign in to comment.