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

node: use bootpeers in mocknet test instead of force connect #1341

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

jchappelow
Copy link
Member

@jchappelow jchappelow commented Feb 4, 2025

This makes TestDualNodeMocket use bootpeers like real apps rather than having the mocknet do it's ConnectAllButSelf magic. Let's see if CI and my machine like this better.

More generally, we've started doing much more outside of the Node constructor and Start, so it might make sense to have these quick in-memory tests in some other node_test package that uses the server construction stuff in app/node directly so this is closer to reality. This test came about before there was even an app using Node.

@@ -381,7 +385,8 @@ func TestDualNodeMocknet(t *testing.T) {
}
ps2, err := NewP2PService(ctx, psCfg2, h2)
require.NoError(t, err)
err = ps2.Start(ctx)
err = ps2.Start(ctx, peerStr1)
Copy link
Member Author

Choose a reason for hiding this comment

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

^ The bootpeers change here is having p2p service number 2 connect to the host number 1's p2p service.

I still don't get what happens in the CI failures, but it complains about missing protocol IDS, which is strange since all the protocol ids should have been set long before the nodes were linked and connected.

@jchappelow
Copy link
Member Author

Will merge this after the beta.2

@jchappelow jchappelow merged commit 6e39385 into kwilteam:main Feb 5, 2025
2 checks passed
@jchappelow jchappelow deleted the node-test-bootpeers branch February 5, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants