Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): use 127.0.0.1 as an address for testing #554

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

thehowl
Copy link
Member

@thehowl thehowl commented Mar 3, 2023

From @zivkovicmilos:

The test.go3 goblin seems to be back locally, as it always fails on my machine 🙃
The test that fails locally is this one, and I’ve found the culprit:

panic: failed to listen on 127.0.0.2:0: listen tcp 127.0.0.2:0: bind: can't assign requested address

goroutine 1 [running]:
github.com/gnolang/gno/pkgs/bft/rpc/test.StartTendermint({0x185a6f8, 0xc000388300}, {0x0, 0x0, 0x98?})
  /Users/zmilos/Work/gno/pkgs/bft/rpc/test/helpers.go:92 +0xff
github.com/gnolang/gno/pkgs/bft/rpc/client_test.TestMain(0x1041051?)
  /Users/zmilos/Work/gno/pkgs/bft/rpc/client/main_test.go:22 +0x5b
main.main()
  _testmain.go:97 +0x1d3
FAIL	github.com/gnolang/gno/pkgs/bft/rpc/client	1.235s

Changing these IPs to 127.0.0.1 instead of 127.0.0.2 solves the issue and the address binds without a problem when starting the Tendermint node
I have no idea why it won’t bind the 127.0.0.2 address on my local mac, since it should be a loopback address range 🤷‍♂️

@thehowl thehowl requested a review from a team as a code owner March 3, 2023 11:40
Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time to slay this goblin ⚔️

@thehowl thehowl self-assigned this Mar 3, 2023
Copy link
Contributor

@harry-hov harry-hov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

Just a nitpick for PR title since it's going to be commit msg:

-fix(tests): don't use 127.0.0.2 as an address for testing
+fix(tests): use 127.0.0.1 as an address for testing

@thehowl thehowl changed the title fix(tests): don't use 127.0.0.2 as an address for testing fix(tests): use 127.0.0.1 as an address for testing Mar 3, 2023
@moul moul merged commit af1272c into gnolang:master Mar 3, 2023
harry-hov pushed a commit to harry-hov/gno that referenced this pull request Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

4 participants