test: introduce libp2p-swarm-test

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.
This commit is contained in:
Thomas Eizinger
2023-03-08 20:36:35 +11:00
committed by GitHub
parent 8a27375f96
commit 7069d78ee3
24 changed files with 1821 additions and 2134 deletions

View File

@ -563,7 +563,7 @@ mod tests {
use crate::Behaviour;
use crate::IdentTopic as Topic;
use libp2p_core::identity::Keypair;
use quickcheck::*;
use quickcheck_ext::*;
#[derive(Clone, Debug)]
struct Message(RawMessage);