-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
integration test for the dual dht #7151
Conversation
764b8be
to
4895adc
Compare
the test now passes locally when run with a go-libp2p containing the fix from libp2p/go-libp2p#887 |
fa2738d
to
e5a4187
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I have some nits but they're not critical.
}) | ||
|
||
testPeer, err := core.NewNode(ctx, &core.BuildCfg{ | ||
Online: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should start the test peer as a client. Otherwise, the test record could get put on the test peer.
_ = testPeer.PeerHost.Network().ClosePeer(lanPeers[i].Identity) | ||
testPeer.PeerHost.Peerstore().ClearAddrs(lanPeers[i].Identity) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we're trying to find a record, not a peer, this shouldn't be necessary.
_ = testPeer.PeerHost.Network().ClosePeer(wanPeers[i].Identity) | ||
testPeer.PeerHost.Peerstore().ClearAddrs(wanPeers[i].Identity) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto. Now that we're calling FindProviders instead of FendPeer, disconnecting doesn't buy us anything.
This adds an integration test.
Currently, an
*IpfsDHT
is exposed by the core, which will not be populated due to the use of thedual
DHT. this test will not be able to refresh the routing table as a result, and will fail at present on thefeat/dual-dht
branch.