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

Introduce libp2p-swarm-test crate #2884

Closed
thomaseizinger opened this issue Sep 12, 2022 · 0 comments · Fixed by #2888
Closed

Introduce libp2p-swarm-test crate #2884

thomaseizinger opened this issue Sep 12, 2022 · 0 comments · Fixed by #2888
Assignees

Comments

@thomaseizinger
Copy link
Contributor

Description

Introduce a crate that contains reusable bits that make it easy to correctly test NetworkBehaviour implemenations. In particular, the crate should support the setting up and connecting a number of swarms, driving them correctly and asserting the emitted events.

Motivation

For code to be high quality it should be tested. If testing is easier, users are more likely to do it, thus yielding higher quality code.

Current Implementation

Are you planning to do it yourself in a pull request?

Yes.

@thomaseizinger thomaseizinger self-assigned this Oct 30, 2022
@mergify mergify bot closed this as completed in #2888 Mar 8, 2023
mergify bot pushed a commit that referenced this issue Mar 8, 2023
This patch-set introduces `libp2p-swarm-test`. It provides utilities for quick and safe bootstrapping of tests for `NetworkBehaviour`s. The main design features are:

- Everything has timeouts
- APIs don't get in your way
- Minimal boilerplate

Closes #2884.

Pull-Request: #2888.
umgefahren pushed a commit to umgefahren/rust-libp2p that referenced this issue Mar 8, 2024
This patch-set introduces `libp2p-swarm-test`. It provides utilities for quick and safe bootstrapping of tests for `NetworkBehaviour`s. The main design features are:

- Everything has timeouts
- APIs don't get in your way
- Minimal boilerplate

Closes libp2p#2884.

Pull-Request: libp2p#2888.
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 a pull request may close this issue.

1 participant