libp2p / rust-libp2p

The Rust Implementation of the libp2p networking stack.
https://libp2p.io
MIT License
4.44k stars 924 forks source link

gossipsub: Re-write tests to remove technical debt #3371

Open thomaseizinger opened 1 year ago

thomaseizinger commented 1 year ago

With https://github.com/libp2p/rust-libp2p/pull/3327, we took out some technical debt to move forward with #2824. The tests which currently depend on ConnectionId should be refactored to spin up a Swarm and establish an actual connection which will then allow us to remove ConnectionId::DUMMY.

thomaseizinger commented 1 year ago

When tackling this issue, search the codebase for the issue number.

dgarus commented 1 year ago

@thomaseizinger Hello, Thomas!

I tried to find a comment with the issue number, but couldn't. Is something changed? I would like to try to make this issue.

Thanks!

thomaseizinger commented 1 year ago

Thanks for wanting to tackle this!

You can also search for all usages of ConnectionId::DUMMY, that should you lead to the same code places that need fixing!

thomaseizinger commented 1 year ago

Usages of ConnectionId::DUMMY are being replaced in https://github.com/libp2p/rust-libp2p/pull/3652. We still want to rewrite those tests to create Swarms instead though.